Regenerating SSH host keys using ssh-keygen
Sun Confidential: Internal Only
50
Sun Fire 3800 - 6800 Quick Reference Guide
SunService Sun Microsystems, Inc. All Rights Reserved. Enterprise Services
Regenerating SSH host keys using
ssh-keygen
It is good practice on a well managed platform to periodically update
the SSH host keys.
6800b-sc0:SC> ssh-keygen -l
ae:95:57:98:76:22:6a:1f:23:77:2a:59:8f:2c:93:e8 (RSA host key)
6800b-sc0:SC> ssh-keygen -r
RSA host key generated.
Use ’restartssh’ to restart the SSH server with the new host key.
6800b-sc0:SC> restartssh
Restarting SSH server will disconnect all active SSH sessions.
continue (yes/no) ? [no] yes
Connection to 6800b-sc0 closed by remote host.
Connection to 6800b-sc0 closed.
admin-ws%
You will now need to remove the line in $HOME/.ssh/known_hosts
pertaining to the original RSA key. If you don’t, you will see the
following warning.
admin-ws% ssh 6800b-sc0
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Someone could be eavesdropping on you right now(man-in-the-middle attack)
It is also possible that the RSA host key has been changed.
The fingerprint for the RSA key sent by the remote host is
md5 73:85:43:25:d9:60:8c:6b:5c:f8:18:68:9b:80:fe:ae.
Please contact your system administrator.
Add correct host key in /home/brianja/.ssh/known_hosts
Offending key is entry 1 in /home/brianja/.ssh/known_hosts
RSA host key for 6800b-sc0 has changed and you have requested strict
checking.
chronos%