1

Assuming I have a user (on a client) that wishes to SSH to a server that it has never connected to before without any user intervention (don't have to very username/password/server fingerprint)

What are the prerequisites to get this done?

Need is what I think:

  • User will have to be added to the server
  • The Server fingerprint will have to be added known_hosts on the users client home directory
  • The users client ssh key will have to be added to authorisedkeys in the users home directory on the server

Have I missed anything?

1 Answer 1

2

You need to create a user on the server for your new user.

The User need to generate his SSH Public Key on his local computer and share it with you. Located in general in /home/user_name/ and the file is id_rsa.pub

On the server, you need to create the ~/.ssh/authorized_keys file in the home directory of the new user. Paste the public key in the authorized_keys file.

When the user will try to connect to the first time, the RSA key will be added to his trusted hosts on his local computer and then he will be able to connect via ssh without password.

I think that's it

2
  • Does it not ask if the user would like to add the host to the trusted hosts? I don't want this, I don't want any user intervention required.
    – Cheetah
    Apr 9, 2013 at 14:50
  • If you add the host key to ~/.ssh/known_hosts on the user computer it should connect without any prompt.
    – Michel
    Apr 10, 2013 at 12:59

You must log in to answer this question.

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