Ssh complains host id has been changed

There are situations when host id might be changed a few times during fast, automatic, and massive host deployment. Ssh client begins to complain on changed host id.

[root@builder2 ~]# ssh webmel53
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
7f:14:74:68:ca:9e:e2:ec:1c:44:8c:ea:29:a9:84:60.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:80
RSA host key for webmel53 has changed and you have requested strict checking.
Host key verification failed.

Quick and easy step follows:

[root@builder2 ~]# ssh-keygen -R !$
ssh-keygen -R webmel53
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
This entry was posted in bash. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">