# \[solved\] SSH root key login

**URL:** https://forums.suse.com/t/solved-ssh-root-key-login/11976
**Category:** General
**Created:** [October 8, 2018, 8:12pm UTC](https://forums.suse.com/t/solved-ssh-root-key-login/11976 "2018-10-08T20:12:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![naisanza](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/naisanza/32/3120_2.png) [@naisanza](https://forums.suse.com/u/naisanza)
#### Post date: [October 8, 2018, 8:12pm UTC](https://forums.suse.com/t/solved-ssh-root-key-login/11976/1 "2018-10-08T20:12:39Z")

</div>

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

```auto
ubuntu:latest

```

install ssh ansible playbook:

```auto
---
- 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

```auto
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
