Disable PasswordAuthentication for ssh

dreamcompute

#1

I’m having an issue disabling PasswordAuthentication when using ssh to login to Ubuntu.

Currently /etc/ssh/sshd_config has PasswordAuthentication set to no:

Change to no to disable tunnelled clear text passwords

PasswordAuthentication no

To restart ssh I then use:
sudo service ssh restart

However if I exit and then ssh in again I am still prompted for a pass even though my key is valid.

What am I missing?


#2

I suspect you’re using the wrong key. Try to increase ssh verbosity (ssh -vv, for example) and see exactly what the error is. Let us know.