In file /etc/ssh/sshd_config uncomment the following line

#PasswordAuthentication no

Then run

service ssh restart