remove host key under known_hosts

Normally after a server rebuild you will receive a warning that the host identification has changed

 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.


One solution is to remove the offending host key

ssh-keygen -f "/home/chris/.ssh/known_hosts" -R ip-address-of-the-host

By penoi on Tuesday, May 8, 2012 | | A comment?
0 responses to “remove host key under known_hosts”