ssh出現WARNING: POSSIBLE DNS SPOOFING DETECTED!

 

(Python3.6) appleyuchi@Desktop:~$  ssh-copy-id -i .ssh/id_rsa.pub  appleyuchi@Laptop
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".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: POSSIBLE DNS SPOOFING DETECTED!          @
ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: The ECDSA host key for laptop has changed,
ERROR: and the key for the corresponding IP address 192.168.0.103
ERROR: is unknown. This could either mean that
ERROR: DNS SPOOFING is happening or the IP address for the host
ERROR: and its host key have changed at the same time.
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:1n48LRTTlQUqoNlSZmT99m/suucIGj1VsD7NF6hw5RQ.
ERROR: Please contact your system administrator.
ERROR: Add correct host key in /home/appleyuchi/.ssh/known_hosts to get rid of this message.
ERROR: Offending ECDSA key in /home/appleyuchi/.ssh/known_hosts:3
ERROR:   remove with:
ERROR:   ssh-keygen -f "/home/appleyuchi/.ssh/known_hosts" -R "laptop"
ERROR: ECDSA host key for laptop has changed and you have requested strict checking.
ERROR: Host key verification failed.

 

解決方案來自報錯log:

這個常常是因爲一臺機子重裝系統了,

重裝後, 集羣中的局域網 IP重新分配,各個節點的/etc/hosts沒有完全修改和同步導致的

ssh-keygen -f "/home/appleyuchi/.ssh/known_hosts" -R "laptop"

然後再次:

ssh-copy-id -i .ssh/id_rsa.pub  appleyuchi@Laptop

即可

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章