How to disable password authentication for SSH

In file /etc/ssh/sshd_config

<code># Change to no to disable tunnelled clear text passwords
#PasswordAuthentication no
</code>

Uncomment the second line, and, if needed, change yes to no.

Then run

<code>service ssh restart</code>