独角兽企业重金招聘Python工程师标准>>>
1.问题描述
最近重装了41机器,我在40重新ssh登录41机器时出现一下警告:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 is06:50:e8:53:74:0e:1f:ab:fb:4c:86:35:f8:c7:aa:0c.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:1RSA host key for 10.10.136.41 has changed and you have requested strict checking.
2.问题分析
这个是因为ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告, 避免你受到DNS Hijack之类的攻击。由于我重装了41机器,所以公钥不一样,出现以上这些警告
3. 问题解决
最简单的办法就是把40上~/.ssh/knows_hosts 里和 41相关的KEY信息删除掉。重新ssh登录就正常了
4.问题参照:
THANKS
http://linuxme./1850814/375752