首页 > 代码库 > The ECDSA host key for XXX has changed

The ECDSA host key for XXX has changed

运行Hadoop时出现了:

技术分享

导致运行失败。仔细分析后发现,这是因为以前192.168.1.201的主机名为master,后来把192.168.1.202改名为master,由于两台主机的公钥不一样,所以提示DNS欺骗(网络中有主机冒充master),或者master的IP地址和公钥同时改变了。

解决的办法是将/home/${username}/.ssh/known_hosts中master的公钥删除掉就正常了。

The ECDSA host key for XXX has changed