ssh连接提示“REMOTE HOST IDENTIFICATION HAS CHANGED! ”解决办法
2016-04-02 23:38
423 查看
接上一篇安全狗的博客,由于ab压测触发了安全狗的防御机制,将我的IP加到iptables黑名单了。当时我也不知道具体原因,就通过同一网络的其它节点试图ssh连接到那台nginx服务器上看看究竟出了什么情况。
但是在连接时候弹出类似下面的提示:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 is36:68:a6:e6:43:34:6b:82:d7:f4:df:1f:c2:e7:37:cc.Please contact your system administrator.Add correct host key in /u/xlian008/.ssh/known_hosts to get rid of this message.Offending key in /u/xlian008/.ssh/known_hosts:2RSA host key for 135.1.35.130 has changed and you have requested strict checking.Host key verification failed.
后来百度了下,找到原因了:
ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告,避免你受到DNS Hijack之类的攻击。
既然找到原因了,那就好解决了,直接编辑~/.ssh/known_hosts,将需要连接的那个IP相关rsa信息删除即可。,再次成功的话,它会将内容继续写入到 ~/.ssh/known_hosts中。
但是在连接时候弹出类似下面的提示:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 is36:68:a6:e6:43:34:6b:82:d7:f4:df:1f:c2:e7:37:cc.Please contact your system administrator.Add correct host key in /u/xlian008/.ssh/known_hosts to get rid of this message.Offending key in /u/xlian008/.ssh/known_hosts:2RSA host key for 135.1.35.130 has changed and you have requested strict checking.Host key verification failed.
后来百度了下,找到原因了:
ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告,避免你受到DNS Hijack之类的攻击。
既然找到原因了,那就好解决了,直接编辑~/.ssh/known_hosts,将需要连接的那个IP相关rsa信息删除即可。,再次成功的话,它会将内容继续写入到 ~/.ssh/known_hosts中。
相关文章推荐
- html不可不知的15条编码原则
- Java 理论与实践: 正确使用 Volatile 变量
- Java异常
- 构建之法阅读笔记03
- C语言实现由PID获取进程名&由进程名获取PID
- 阿里云服务器映射到本地磁盘
- 安卓TextView控件的显示和隐藏
- 【9-4】迭代dict的key和value
- 20160402_C语言位操作符的使用
- POJ-1947 Rebuilding Roads (树形DP+分组背包)
- LeetCode题解--9. Palindrome Number
- c++ primer 第五版 Screen类(不包含Window_mgr类)
- TensorFlow 简明教程(python版)
- 保护继承
- Spring Cache Demo
- 2013 带分数
- 机器学习:贝叶斯总结_2:概率分布
- win7下安装node.js,包括npm 之后将coffeescript格式文件编译成js文件
- 【9-3】迭代dict的value
- 各种协议的定义和对应英文(方便记忆和查阅)(更新中)