本文主要是介绍WARNING: POSSIBLE DNS SPOOFING DETECTED! 和 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! 的解决方案,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
当一个节点的ip发生变化,再进行ssh 就会提示以下错误:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for hbase3 has changed,
and the key for the corresponding IP address 192.168.10.123
is unchanged. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
Offending key for IP in /home/hadoop/.ssh/known_hosts:38remove with:ssh-keygen -f "/home/hadoop/.ssh/known_hosts" -R 192.168.10.123
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:q0DLHcBRoXyAXo3BlfjMSQ5khxS3LB2euNO3QSLJ8lQ.
Please contact your system administrator.
Add correct host key in /home/hadoop/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/hadoop/.ssh/known_hosts:22remove with:ssh-keygen -f "/home/hadoop/.ssh/known_hosts" -R hbase3
ECDSA host key for hbase3 has changed and you have requested strict checking.
Host key verification failed.
原来是known_hosts文件里面的问题,
known_hosts是记录远程主机的公钥,我目前这个虚拟机是从其他虚拟机克隆过来的,里面保存的公钥信息是先前的公钥信息,在ssh链接的时候首先会验证公钥,如果公钥不对,就会出现报错信息。
解决方法:
1、只要将known_hosts文件里相应报错的ip信息删除即可。
2、将known_hosts文件所有信息清空,不过这种方式并不是很理智,因为里面还保存了其他节点的信息。
3、使用命令
ssh-keygen -R 172.16.152.209
这篇关于WARNING: POSSIBLE DNS SPOOFING DETECTED! 和 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! 的解决方案的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!