Sian 发表于 2014-7-24 09:16:59

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

一、错误提示:
Last login: Thu Jul 24 08:22:08 on ttys001yusiandeMacBook-Pro:~ yusian$ ssh [email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    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 is1b:df:79:37:91:ee:9f:1b:c2:c2:14:47:64:4d:f0:9e.Please contact your system administrator.Add correct host key in /Users/yusian/.ssh/known_hosts to get rid of this message.Offending RSA key in /Users/yusian/.ssh/known_hosts:2RSA host key for yusian.net has changed and you have requested strict checking.Host key verification failed.
二、出现原因:由于更换了远程主机的操作系统,再次通过ssh登录同一个ip时会出现如上所示提示,网上有很多解决办法,说是删除某个文件或修改某个文件,但容易让人误解成修改服务器,事实上是修改终端本地配置
三、解决办法:Add correct host key in /Users/yusian/.ssh/known_hosts to get rid of this message.这句话已经说得很清楚了,ssh连接是加密的,本地生成的密钥只能应用于某个连接对,现在远程主机更换,ip又没变,所以ssh之前协商好的加密方式不能使用删除临时文件rm /Users/yusian/.ssh/known_hosts
搞定!
页: [1]
查看完整版本: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!