Email this to a friend
 
posted on August 19th 2010, at 16:19
by lunarg

If for some reason you lost your SSH server keys, sshd will fail to start with error:

Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key

You can recreate your host keys with these commands:

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

After recreating the keys, you will probably have to let your clients know as with the change of keys, they'll probably get warnings about it (Linux SSH will not even connect until you kick out the old keys).

Send a link to this post to yourself or a friend.

Send to e-mail:
Your name:
Your e-mail:
Captcha:
Type the letters and numbers as shown.
/get/captcha/1713449221
Not readable? Get another.
 
Information entered is solely used for sending a one-time e-mail, and is not retained and/or passed on to a third party.
 
 
 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« You only find out who is swimming naked when the tide goes out. »
Warren Buffett