西数超哥博客
运维经验教程分享的博客

RSA host key for mysharebook.cn has changed and you have requested strict checking. Host key verification failed. 密钥添加报错解决八法

目标重装服务器以后,本地添加密钥到这个服务器,发生如下报错:

[root@kvm_salt_zabbix gitlab]# ssh-copy-id -i   /root/.ssh/id_rsa.pub   root@47.52.x.x
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 is
de:af:f7:0e:b8:aa:87:a7:b7:79:c4:0a:59:fc:d2:46.
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:1
RSA host key for 47.52.x.x has changed and you have requested strict checking.
Host key verification failed.

原因目标服务器重装以后,key发生变化。
解决办法1:
当前服务器(非目标服务器)vim  ~/.ssh/known_hosts   删除这个目标服务器记录以后,重新添加即可。
解决办法2:
ssh-keygen -R 目标服务器IP    执行完命令以后重新添加。

 

问题解决。
解决办法参考:
1,解决办法1参考方式  http://www.cnblogs.com/jackyzzy/p/3216096.html
2,解决办法2参考方式  http://blog.csdn.net/sebarsunny/article/details/7167828

转载请注明:西数超哥博客www.ysidc.top» RSA host key for mysharebook.cn has changed and you have requested strict checking. Host key verification failed. 密钥添加报错解决八法

https://www.ysidc.top 西数超哥博客,数据库,西数超哥,虚拟主机,域名注册,域名,云服务器,云主机,云建站,ysidc.top

赞(0) 打赏
声明:本站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,若涉及侵权请及时告知,将会在第一时间删除。本站原创内容未经允许不得转载:西数超哥 » RSA host key for mysharebook.cn has changed and you have requested strict checking. Host key verification failed. 密钥添加报错解决八法

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏