0

It's easy enough to disable password authentication for SSH as a whole, but is there a way of allowing one user on the system the ability of logging in with a password?

The reason for this is we have several servers at rackspace and we'd like to allow rackspace access to the servers without having to set it up on all of the machines (there are lots!)

If it's simply not possible without editing the source of sshd or something that'd be good to know :)

1
  • This includes all future users, so no per-user rules please unless they can be applied to future users.. perhaps that's the way to do it..
    – John Hunt
    Apr 19, 2013 at 13:00

2 Answers 2

3

Within the sshd configuration, you can apply different settings for User, Group, Host, LocalAddress, LocalPort, and Address using the Match directive.

For what you need put this is the /etc/ssh/sshd_config file:

PasswordAuthentication no
PubkeyAuthentication yes
Match User <USERNAME>
  PasswordAuthentication yes
0
0

Add the below commands in to the /etc/ssh/sshd_config

  1. ChallengeResponseAuthentication no
  2. PasswordAuthentication no
  3. UsePAM no
  4. PubkeyAuthentication yes

Then reload SSH service :

sepahrad@pc:~$ /etc/init.d/ssh reload

2
  • What about my one user that needs to use a password?
    – John Hunt
    Apr 19, 2013 at 14:11
  • Sorry i forgot it! You can use Match User Apr 19, 2013 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .