Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Is it possible to seed ssh-keygen with a fixed string so that it consistently generates the same keypair?

share|improve this question
Why do you want to do this? Can't you copy the key files instead? – Sven Jun 14 '12 at 8:56
@SvenW I can, and I am, but this would be an alternative for when there is no central repository to store the keys. – Bart van Heukelom Jun 14 '12 at 11:22
And why is this downvoted? I can understand if one does not agree with this method, but this is not a bad question? – Bart van Heukelom Jun 14 '12 at 11:22
@BartvanHeukelom if you lack a central repository to store the keys then you also lack a central repostory to store the seeds, no? – Celada Jun 14 '12 at 12:42
This is a valid question. The seeds could be generated from a condition, like a hostname or MAC address. If the public key has been put in authorized_keys on other servers, if the machine is rebuilt for any reason, the key can be regenerated from the hostname (without keys having to be stored somewhere), and it will retain access to those other servers. I'd also be interested in an answer to how this may be done. – Anthony Roy Dec 6 '12 at 9:57

No. You can pick certain criteria which may reduce the randomness of the generated key, but the generation process is not a simple as picking a particular seed from which the keys are generated.

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.