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
ubuntu:latest
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
sshd_config
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
PermitRootLogin prohibit-password
Update:
Always be sure to check the directory and file permissions. Sometimes they’re too open, sometimes they’re owned by someone else