當在使用SSH連線到別台主機時若出現以下錯誤可參考以下解決方式。
錯誤訊息:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| [[email protected] ~]$ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
48:0e:28:11:d6:81:68:16:04:5f:db:49:02:la:12:4e.
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:12
RSA host key for 192.168.50.6 has changed and you have requested strict checking.
Host key verification failed.
|
解決方法(擇一即可):
1. 把有問題的host key刪掉#
1
| vim /neil/.ssh/known_hosts
|
2. 刪除known_hosts#
1
| rm -rf /neil/.ssh/known_hosts
|
3. 重新產生key#
1
| ssh-keygen -R 192.168.50.6
|