有時候ssh到別台主機時,偶而會發生以下錯誤訊息。
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 RSA key sent by the remote host is
b0:b3:7c:bd:b3:5b:6a:44:aa:38:36:7f:05:6d:88:25.
Please contact your system administrator.
Add correct host key in /Users/flowercatswets/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/flowercatswets/.ssh/known_hosts:3
RSA host key for 192.168.0.101 has changed and you have requested strict checking.
Host key verification failed.
先別緊張,會出現這訊息是因為,第一次SSH連現時,會生成一個認證,儲存在現在用的這台電腦中的known_hosts,但是如果伺服器端重灌過了(或是這個IP換人用了),認證資訊當然不符合,就會跳出錯誤啦~因此,只要把電腦中的認證資訊刪除,再重新產生一次即可,心法如下
ssh-keygen -R 伺服器端的IP或網址
例如
ssh-keygen -R 192.168.0.101
之後再重新連線一次即可。
沒有留言:
張貼留言