ssh-copy-id 秘鑰分發報錯


重裝了操作系統,本機/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    


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM