文章 86
评论 73
浏览 88264
ssh-key改变后出现的错误解决方法

ssh-key改变后出现的错误解决方法

[root@ceph1 ceph]# scp root@192.168.51.206:/etc/ceph/ceph.conf root@192.168.51.212:/root
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ECDSA key sent by the remote host is
SHA256:USPeF4jTZDOv4uSyLhKx/lCUYkK/4fjb/QzIxO90akc.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:4
ECDSA host key for 192.168.51.212 has changed and you have requested strict checking.
Host key verification failed.
lost connection
Connection to 192.168.51.206 closed.

解决方法:

ssh-keygen -R 192.168.51.212

解决方法 2:

vim ~/.ssh/known_hosts

把相关远程主机信息删掉

到头来 我们记住的 不是敌人的攻击 而是朋友的沉默 ---马丁·路德·金

                    

记录精彩的坎坷人生,经营属于自己的世界!