I was wondering if it would be possible to only force SSH key based authentication to one user (admin) and allow all other users on the system (excluding root, who's ssh login is already disabled in sshd_config) to authenticate via Password.
You can do that by modifying your sshd_config
to add:
Match User <username>
PasswordAuthentication no
You can do the same for groups as well by using Match Group
instead
Don't forget to restart sshd
after
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments