Disable PasswordAuthentication for SSH logins

I am trying to disable password authentication for SSH logins. I have create /etc/ssh/ssd_config with the following contents:

PermitRootLogin no
PasswordAuthentication no

However, it still allows me to log in using a password.

I wrote man stateless to explicitly cover this use case. The problem is that there are several paths to password authentication and you need to disable all of them properly. The correct contents of the file should be:

ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no

For more info, see:


Give it a try and let us know if that worked for you.

1 Like

It works great, thanks again. I didn’t know about that man page, I will give it a thorough reading.

1 Like