How to Disable Password Authentication for SSH
October 21, 2016
[ Linux ]
security linux

If you are already set up to login to your Linux server using SSH key authentication, you can increase the security of your server by disabling password authentication. To disable password authentication for SSH, do the following:

$ sudo nano /etc/ssh/sshd_config

Set the following settings, or change them to “no” if they already exist:

ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no

Save the file and restart the ssh server:

$ sudo systemctl restart sshd.service

Or on older non-systemd distros:

$ /etc/init.d/sshd restart
  • 2017/08/29 Slitaz Rules
  • 2017/08/25 Milano Has 230 Lines of Code
  • 2017/08/23 Introducing Bunsenlabs
  • Comments

    comments powered by Disqus