首页 > 其他 > 详细

ssh-copy-id 秘钥分发报错

时间:2021-05-24 09:26:09      阅读:22      评论:0      收藏:0      [点我收藏+]

重装了操作系统,本机/root/.ssh/known_hosts文件存在着上一次分发记录,所以导致以下报错

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

/usr/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:VK3OAQJiLsUM+G2RAb0iJ9HiCFAVw1UOc+5DDshb57w.
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:17
ERROR: ECDSA host key for 192.168.1.107 has changed and you have requested strict checking.
ERROR: Host key verification failed.

解决办法

[root@node1 ~]# ssh-keygen -R 192.168.1.107    

再次秘钥分发即可免密登录

[root@node1 ~]# ssh-copy-id root@192.168.1.107    

ssh-copy-id 秘钥分发报错

原文:https://www.cnblogs.com/hsyw/p/14802682.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!