3

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

Darren
  • 927
  • 2
  • 8
  • 15

2 Answers2

7

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
Shane Madden
  • 112,982
  • 12
  • 174
  • 248
5

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
quanta
  • 50,327
  • 19
  • 152
  • 213