[solved] SSH root key login

I’m unable to get the ubuntu:latest docker image to let me SSH login with a key to the root account.

It works if I create a new user, but I need it to work for the root account

Rancher 2.x vanilla settings

docker image


install ssh ansible playbook:

- hosts: all

  - name: Install openssh-server
    apt: update_cache=yes name=openssh-server state=latest

  - name: Start openssh-server
        name: ssh
        state: started

  - name: Enable persistence
    shell: systemctl enable ssh


ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem	sftp	/usr/lib/openssh/sftp-server
PermitRootLogin prohibit-password


Always be sure to check the directory and file permissions. Sometimes they’re too open, sometimes they’re owned by someone else