7

I followed the step six at https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets but I still get a password prompt when I try to connect to the server using ssh from other machines that don't have the private key.

Troubleshooting ideas? Thanks

1 Answers1

7

That is normal behaviour. You will be prompted for a password, but if PermitRootLogin without-password is set, then no password will work. If you don't want to be prompted for a password at all, then set in your sshd_config:

PasswordAuthentication no

If you only want to deny it for root, try:

Match User root
    PasswordAuthentication no
muru
  • 207,228