原因:将原来的2U服务器更换为1U服务器,其他设置不变,导致known_hosts更改了。
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
21:24:59:ba:53:d7:51:a2:12:13:40:09:53:03:5b:e6.
Please contact your system administrator.
Add correct host key in /home/leo/.ssh/known_hosts to get rid of this message.
Offending key in /home/leo/.ssh/known_hosts:11
RSA host key for 10.202.76.27 has changed and you have requested strict checking.
Host key verification failed.
出现该错误的解决方法:
因为在本地机器上曾经用SSH登录过这台远程计算机,因而留下了known_hosts的记录,在远程计算机重新安装系统后不能够通过鉴权。删除~/.ssh/known_hosts中对应的项目,问题获得解决。(很麻烦。。忽视之)
在客户端执行下述指令即可:$mv ~/.ssh/known_hosts /tmp
再次登录后会出现最初需要增加条目:
The authenticity of host '128.112.139.3 (128.112.139.3)' can't be established.
RSA key fingerprint is ce:78:c2:d5:26:11:42:cf:c6:e6:65:99::60:51:34.
Are you sure you want to continue connecting (yes/no)? The authenticity of host '192.168.135.135 (192.168.135.135)' can't be established.
RSA key fingerprint is 91:14::ea:e7:43:5d:8b:57:aa:51:57:e0:28:06:52.
Are you sure you want to continue connecting (yes/no)? yes