I am trying to set up my sshd to accept users that do not have a system user account. My approach is to use DSA public/private key pairs.

  1. I generated a key pair: $ ssh-keygen -t dsa
  2. I copied id_dsa.pub to the server machine where sshd runs.
  3. I appended the line from id_dsa.pub to ~/.ssh/authorized_keys of the single existing system user account I will use for every 'external' user.
  4. I tried to ssh as the 'external' user into the machine where I set-up the authorized_keys and failed miserably.

What am I missing here?


  • 2
    "What am I missing here?" <- Log files and hard data, so someone can actually help you. – joschi Mar 18 '10 at 6:35
  • 1
    The output of ssh -vv {remotehost} from your client will be helpful here. – Zoredache Mar 18 '10 at 6:41
  • 1
    As well as the daemon and auth logs on the server… – joschi Mar 18 '10 at 7:11

Probably permissions.

$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys

Since you will only use puclic key authentication, modify the /etc/ssh/sshd_config file in the server machine as follows:

PubkeyAuthentication yes
HostbasedAuthentication no
ChallengeResponseAuthentication no
GSSAPIAuthentication no
PasswordAuthentication no

Restart the sshd daemon and you should be fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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