Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a client providing me with his own key, he wants me to setup a SSH server so that he can send me files. As far as I understand, when I setup my SSH Server (freesshd on Windows) I need a private key that will be the fingerprint of my server. Then using the private key provided or generating a new private key, I can generate a public key that I will tie to a user account, allowing my client to use that public key to login without a user/pass combo.

I don't think a server can be configured to use a public key that was not generated from the private key associated with that server.

Am I correct or is there a way to use an existing public key to setup a SSH server if that key was not generated from the private key of said server? Thanks to all!

share|improve this question

migrated from Jun 21 '13 at 12:35

This question came from our site for professional and enthusiast programmers.

Search for freesshd import public key. – ott-- Jun 21 '13 at 12:55
up vote 4 down vote accepted

Your client has both his private key (typically called id_rsa) and public key (typically called

If he sends you his public key - which is simply oneline text file, and you add contents of this file into authorized_keys on the server (in his account .ssh directory), then this client can ssh without password. Simple fact that his client has access to his private key (id_rsa) is enough for ssh to establish password-less connection. But this is also the reason why private key should be guarded very carefully, and be never sent to anyone (including you, server owner). Public key, on other hand, is perfectly fine to show and send to anyone - it is useless without having access to private key.

Also (on Linux at least), ssh has certain rules regarding permissions for files id_rsa, and authorized_keys. For example, it will refuse to work if permissions on private key and authorized keys are not strict enough (something like 0600 - user-owned only must be in effect).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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