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
Rancher 2.x vanilla settings
install ssh ansible playbook:
--- - hosts: all tasks: - name: Install openssh-server apt: update_cache=yes name=openssh-server state=latest - name: Start openssh-server service: 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