用ssh登录一个机器(换过ip地址),提示输入yes后,屏幕不断出现y,只有按ctrl + c结束
错误是:The authenticity of host 192.168.0.xxx can't be established.
执行ssh -o StrictHostKeyChecking=no 192.168.0.xxx 就OK
某天机器又改IP了,ssh后,报:
mmt@FS01:~$ ssh -o StrictHostKeyChecking=no 192.168.0.130
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
16:d1:6c:31:e1:8a:b1:5c:ca:4f:d9:0a:be:d3:38:c5.
Please contact your system administrator.
Add correct host key in /Users/liuhang/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/liuhang/.ssh/known_hosts:7
RSA host key for 192.168.1.130 has changed and you have requested strict checking.
Host key verification failed.
注意这句
Add correct host key in /home/mmt/.ssh/known_hosts to get rid of this message.
执行:
mv /home/mmt/.ssh/known_hosts known_hosts.bak
再连:
ssh -o StrictHostKeyChecking=no 192.168.0.130
OK了!
本文介绍了当目标服务器IP地址更改后,通过SSH连接时遇到的远程主机标识已更改警告及解决方法。提供了禁用严格主机密钥检查的临时解决方案,并详细说明了如何通过更新known_hosts文件来永久解决问题。
2502

被折叠的 条评论
为什么被折叠?



