Ubuntu-ssh - - WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

thiyagu114 picture thiyagu114 · Dec 28, 2011 · Viewed 73.7k times · Source

I'm unable to ssh and rysnc to a remote system. It keeps giving this error message:

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.
The fingerprint for the RSA key sent by the remote host is
a3:8f:7c:07:c9:12:d8:aa:cd:c2:ba:b3:27:68:bc:c2.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:8
RSA host key for xxx.xxx.xxx.xxx has changed and you have requested strict checking.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(601) [sender=3.0.8]

I've removed authorized_keys file from /home/user/.ssh.

Answer

Talespin_Kit picture Talespin_Kit · Nov 27, 2012

use the following command which removes the old keys from .ssh/known_hosts file

ssh-keygen -R <host>