Skip to main content

Prohibit pasword authentication for sshd

· One min read

Make sure PasswordAuthentication is no in config files

cat /etc/ssh/sshd_config | grep -i passwordauthentication
PasswordAuthentication no

cat /etc/ssh/sshd_config.d/50-cloud-init.conf | grep -i passwordauthentication
PasswordAuthentication no

Restart sshd

sudo systemctl restart sshd