8

Is it possible to enable ssh password authentication for one user on a system and disable it for an other.

If you add

ChallengeResponseAuthentication no PasswordAuthentication no UsePAM no 

to /etc/ssh/sshd_config you disable it for all users

Adding it to ~/.ssh/config doesn't seem to work

1 Answer 1

15

Use a Match that matches all the users but the ones you want to be able to use password authentication and add the 'PasswordAuthentication no' in that Match block. Something like:

Match User someuser PasswordAuthentication no 

and so on.

You must log in to answer this question.