On Linux (Debian Squeeze) I would like to disable SSH login using password to some users (selected group or all users except root). But I do not want to disable login using certificate for them.
edit: thanks a lot for detailed answer! For some reason this does not work on my server:
Match User !root
PasswordAuthentication no
...but can be easily replaced by
PasswordAuthentication no
Match User root
PasswordAuthentication yes
Match User "!root,*"did the job. – Roman Hocke Jun 05 '17 at 14:58rootis a very bad idea security-wise. – Aaron Mason Nov 10 '22 at 22:44