Monday, June 27, 2011

SSH: "Remote host Identification has changed" error


SSH is the most common and widely used method for remote login. It is better the Telnet because it provides authentication mechanism to secure your machine (If you dont want to enter your password each time when you login, checkout the previous post on passwordless-ssh-login-howto). But, sometimes one may find that the machine that we used to login sometime back is refusing to authenticate. If the error that you found is
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
9b:8e:77:08:7c:8f:2d:f7:0b:4e:dc:d3:98:29:dd:ec.
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:8
RSA host key for 192.168.1.8 has changed and you have requested strict checking.
Host key verification failed.
Just delete the file ~/.ssh/known-hosts.
> rm ~/.ssh/known-hosts
 Thats it, now try running ssh at the terminal it will succeed.

No comments:

Post a Comment