Ubuntu – Disable password authentication in ssh


I followed the following guide:

But it is still possible to ssh into the machine by entering a password (tried on win with putty)

Any advice?

Best Answer

After you replaced the line:

#PasswordAuthentication yes

with the line:

PasswordAuthentication no

in /etc/ssh/sshd_config and you saved the file, you have to restart your ssh server using the following command in terminal:

sudo service ssh restart


sudo restart ssh