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...

Thanks

link|improve this question

70% accept rate
Do you mean you want to allow users to login with either password or key, not both? – quanta Oct 31 '11 at 4:14
Yes either, not both. – Darren Oct 31 '11 at 5:07
feedback

2 Answers

up vote 3 down vote accepted

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:

PasswordAuthentication yes
PubkeyAuthentication yes
link|improve this answer
feedback

Do you mean you want something like this:

Match User user1
    PasswordAuthentication no
    RSAAuthentication yes
    PubkeyAuthentication yes

Match User user2
    PasswordAuthentication yes
    RSAAuthentication no
    PubkeyAuthentication no
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.