How to allow password authentication OR key authentication on CentOS 5.7?
772
is it possible to enable the use of password authentication or key authentication in CentOS 5.7? All I can find is setting PasswordAuthentication to no which forces the use of keys...
Match User user1
PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
Match User user2
PasswordAuthentication yes
RSAAuthentication no
PubkeyAuthentication no
Disabling
PasswordAuthentication
doesn't force keys, it disables password authentication, as advertised.PubkeyAuthentication
determines whether key authentication is allowed.So, to answer your question directly, the following config allows either password or key auth:
Do you mean you want something like this: