SSH連現時現 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

許聖泉 Michael Hsu
3 min readFeb 28, 2019

--

在使用 SSH 連線到伺服器端時出現

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The ECDSA host key for test.dpqqa.com has changed, and the key for the corresponding IP address is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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: Please contact your system administrator. Add correct host key in get rid of this message. Offending ECDSA key in ECDSA host key for has changed and you have requested strict checking. Host key verification failed.

會出現這訊息是因為,原本SSH連現時會生成一個認證,並且存在客戶端中的 known_hosts 底下,但是如果伺服器端重灌過,則認證資訊也會一併修改,因此就會跳出錯誤

只要到

vim ~/.ssh/known_hosts

把原本伺服器端的 IP 或 Domain name 刪掉,再重新連線就可以拉!

--

--

許聖泉 Michael Hsu
許聖泉 Michael Hsu

No responses yet