Howto disabled password authentication for a specific users or group in sshd

This is based on some excellent information from http://serverfault.com/questions/286159/how-to-disabled-password-authentication-for-specific-users-in-sshd

Add a Match block to your sshd_config file. Something like this:


Match Group SSH_Key_Only_Users
PasswordAuthentication no

Or if it's truly one user


Match User Bad_User
PasswordAuthentication no

See man sshd_config for more details on what you can match and what restrictions you can put in it.

Category
Tags