報錯解決 REMOTE HOST IDENTIFICATION HAS CHANGED

REMOTE HOST IDENTIFICATION HAS CHANGED

報錯

$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ED25519 key sent by the remote host is
SHA256:V6Yv22sNitZoKCoTDCjiT+i7J8v254fj5MLZyi4GtMA.
Please contact your system administrator.
Add correct host key in /Users/ss/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /Users/ss/.ssh/known_hosts:24
Host key for 114.121.43.3 has changed and you have requested strict checking.
Host key verification failed.

解決

需要把緩存的 hosts 刪除就好了

cd $HOME/.ssh/

進入到.ssh目錄,刪除掉known_hosts文件中包含要連接的服務器IP行即可:

sed -i '/114.121.43.3/d' $HOME/.ssh/known_hosts

說明

請關注 危 ❤ 工中號【進擊雲原生】,更有 free 資源供您學習

本文由mdnice多平臺發佈

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