SSH 登录时出现如下错误:Host key verification failed的解决方案
来源:互联网 发布:php防止接口频繁调用 编辑:程序博客网 时间:2024/04/20 11:18
使用 SSH 登录云服务器 ECS (Elastic Compute Server) Linux 服务器时,出现类似如下错误信息,导致无法正常连接。
- Linux 环境连接报错信息:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 isae:6e:68:4c:97:a6:91:81:11:38:8d:64:ff:92:13:50.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:70RSA host key for x.x.x.x has changed and you have requested strict checking.Host key verification failed.
Windows 环境,以常见的 NetSarang Xshell 客户端为例,连接报错如下公钥指纹不匹配示意图所示:
X.X.X.X (端口: XX)的主机密钥与本地主机密钥数据库中保存的不一致。主机密钥已更改或有人试图监听此连接。若无法确定,建议取消此连接。问题原因
Linux服务器系统重装、账户信息变更等致使其SSH 公钥变更,造成客户端保存公钥指纹与服务端不一致,导致 SSH 认证失败,拒绝登录。
客户端是 Windows 环境
如果客户端是 Windows 环境,还是以Xshell 客户端为例,要解决此问题,请进行如下操作:
- 打开Xshell程序。
- 单击 工具 > 主机密钥管理者,如下图所示,选中目标服务器对应条目,然后点击 删除 。
- 重新登录服务器,确认保存新的公钥指纹后,即可成功登录。
说明:如前图所示,也可以在弹出相关告警信息的时候,直接点击 接收并保存 。让程序自动更新新密钥指纹信息,就可以继续正常登录。
客户端是 Linux 环境
如果客户端是 Linux 环境,要解决此问题,请进行如下操作:
- 使用 vi 等编辑器,编辑对应账户的 known_hosts 文件:
vi ~/.ssh/known_hosts
- 类似下图所示,找到对应条目,将其删除:
- 重新连接服务器,确认保存新的公钥指纹后,即可成功登录。
阅读全文
0 0
- SSH 登录时出现如下错误:Host key verification failed的解决方案
- 登录ssh时Host key verification failed错误
- 配置SSH时遇到 "Host key verification failed." 的解决方案
- ssh登录失败:Host key verification failed.
- ssh登录失败:Host key verification failed
- SSH登录失败Host key verification failed.
- ssh登录失败:Host key verification failed
- SSH 登录失败:Host key verification failed 的处理方法
- SSH 登录失败:Host key verification failed 的解决方法
- SSH 登录失败:Host key verification failed 的处理方法
- SSH 登录失败:Host key verification failed 的处理方法
- SSH出现Host key verification failed
- ssh中“Host key verification failed.“的解决方案
- ssh中“Host key verification failed.“的解决方案
- ssh中“Host key verification failed.“的解决方案
- ssh中“Host key verification failed.“的解决方案
- ssh中“Host key verification failed.“的解决方案
- ssh中“Host key verification failed.“的解决方案
- nodejs
- oracle对汉字的排序
- 如何找到想要的资源?
- 把文件转化为byte[],java
- 小机上运行ORACLE需要注意的进程调度BUG
- SSH 登录时出现如下错误:Host key verification failed的解决方案
- MySQL5.6密码过期设置
- MyEclipse+Tomcat配置详解
- 【CF360D】Levko and Sets 题解
- 【Github Issues】Glide Issues
- JavaNIO
- C#多线程面面观
- java-foreach操作数组
- coreBlueTooth(续)