近来无聊无事,随便发一个SSH中常见的错误吧。
Last login: Sun Dec 28 17:33:02 2003 from 192.168.1.1
[root@mail root]# ssh -l knet 192.168.0.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
09:de:ab:29:81:7f:0b:7f:27:22:88:02:fd:99:98:00.
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:1
RSA host key for 192.168.0.2 has changed and you have requested strict checking.
Host key verification failed.
[root@mail root]#
[root@mail root]# ssh -l knet 192.168.0.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
09:de:ab:29:81:7f:0b:7f:27:22:88:02:fd:99:98:00.
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:1
RSA host key for 192.168.0.2 has changed and you have requested strict checking.
Host key verification failed.
[root@mail root]#
上面这个提示,很多人应该都遇到过
其实处理很简单,
注意这一行:
Offending key in /root/.ssh/known_hosts:1
找到/root/.ssh/known_host
然后,直接跳到这行后面所接的那个数字行,将其删掉就可以了
这个问题基本上是因为IP的重分配置或者重装目标系统所造成的密钥不匹配造成的