Generating new ssh server keys

From PeTechWiki
Revision as of 19:32, 20 September 2013 by J (talk | contribs) (Created page with " Reference: [http://www.softec.lu/site/DevelopersCorner/HowToRegenerateNewSsh How to regenerate new ssh server keys - XWiki] If you clone an existing server setup to create a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Reference: How to regenerate new ssh server keys - XWiki

If you clone an existing server setup to create a new server, you'll probably want to generate a new set of keys for the new ssh server.

For SSH1 protocol, you need an rsa1 key:

ssh-keygen -q -f /etc/ssh/ssh_host_key -N  -t rsa1

For SSH2 protocol, you need two keys, one rsa key and one dsa key:

ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N  -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N  -t dsa