0


WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED 解决方案

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED 解决方法

一、错误描述

[root@slave1 ~]# ssh-copy-id master.hadoop
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/bin/ssh-copy-id: ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
ERROR: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
ERROR: It is also possible that a host key has just been changed.
ERROR: The fingerprint for the ECDSA key sent by the remote host is
ERROR: SHA256:rUXoAX6rSbaGn5IIv6pdcrm9eaajEdwZcrRzVlioUaU.
ERROR: Please contact your system administrator.
ERROR: Add correct host key in /root/.ssh/known_hosts to get rid of this message.
ERROR: Offending ECDSA key in /root/.ssh/known_hosts:1
ERROR: ECDSA host key for master.hadoop has changed and you have requested strict checking.
ERROR: Host key verification failed.

二、解决方案

本地上次存储的 known_hosts 文件进行更新,我们的目标主机发生改变,需要进行手动更新一下,再重新连接一一下就可以了。

​ 输入以下指令:(对本地的 known_hosts 文件进行更新)

ssh-keygen -R XXX(目标主机ip地址)

​ 按照我的例子(ip:192.168.118.130),会返回以下信息:

[root@slave1 .ssh]# ssh-keygen -R 192.168.118.130

# Host 192.168.118.130 found: line 1

/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old

重新尝试连接:

输入yes,按下回车,成功连接。

如果想了解为什么这样的,可以前往下面的这个链接。

【linux】WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED 解决方法_warning: remote host identification has changed!_性感博主在线瞎搞的博客-CSDN博客

标签: linux 大数据 ambari

本文转载自: https://blog.csdn.net/qq_46634307/article/details/130085681
版权归原作者 逍遥创江湖 所有, 如有侵权,请联系我们删除。

“WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED 解决方案”的评论:

还没有评论