Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question
4  
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
1  
@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

1 Answer 1

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

 
discard

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.