В /etc/ssh/sshd_config поставить PasswordAuthentication no и перезагрузить сервис: systemctl reload sshd.
/etc/ssh/sshd_config
PasswordAuthentication no
systemctl reload sshd