您的位置:首页 > Web前端

Offending RSA key in /Users/liuhang/.ssh/known_hosts:7

2015-12-16 09:15 501 查看
用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了!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ubuntu virtualbox