樹莓派 SSH 連線報錯“WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!”的解決
阿新 • • 發佈:2018-12-18
假如出現這種情況:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:EqIFQoWYDISyGnJggyqnk8888LeNn3tr1+QmBQaso0. Please contact your system administrator. Add correct host key in /Users/caolijian/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/caolijian/.ssh/known_hosts:12 ECDSA host key for 192.168.1.112 has changed and you have requested strict checking. Host key verification failed.
則是需要清理一下之前儲存的認證金鑰。
// 檢視
ssh-keygen -l -f ~/.ssh/known_hosts
// 清理192.168.1.112的認證rsa
ssh-keygen -R 192.168.1.112