今天用scp命令複製時,提示如下錯誤:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
25:ab:2e:55:30:11:a0:84:d8:45:2f:5b:e2:47:eb:1e.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
RSA host key for 192.168.1.240 has changed and you have requested strict checking.
Host key verification failed.
lost connection
開始我以為是命令錯誤,仔細一看,原來是密鑰驗證錯誤,可能是我的帳號資訊做過更改。
找到該使用者家目錄下的如下的ssh串連檔案夾:
1. cd ~/.ssh/
2. vi known_hosts
3. 找到和遠程主機ip一致的密鑰儲存資訊,直接dd刪除,然後:x儲存退出
4. 重新串連,輸入密碼,發現串連成功
問題解決
本文出自 “原下” 部落格