在做一个数据拷贝,要用到ssh,连接时提示:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    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

bf:52:0b:5a:98:ce:b0:f6:d8:a8:eb:71:3c:b7:4c:9e.

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 X.X.X.X has changed and you have requested strict checking.

Host key verification failed.


问题环境描叙:这里我用a和b描叙两台机器。a以前从b通过scp拷贝数据文件,并且已经做了免密码登录认证的,后来b机器出现问题,另外换了一台机器来替代b,但是保留了b原来的ip,然后继续从a机器ssh登录b时,提示上述问题。

解决办法:ssh-keygen -R bHostIp

或者直接删除a的~/.ssh/know_host文件,但是会丢失保存的其他主机的信息。