歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> SSH: Ubuntu 10.10使用SSH報錯

SSH: Ubuntu 10.10使用SSH報錯

日期:2017/2/28 16:04:13   编辑:Linux教程

以前使用 SSH 登錄公司服務器,挺好使!但是,今天它罷工了。

像往常一樣,在終端輸入命令登錄服務器:

  1. sudo ssh -l root 192.168.0.88
sorry,它提示信息如下:
  1. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2. @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
  3. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  4. IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
  5. Someone could be eavesdropping on you right now (man-in-the-middle attack)!
  6. It is also possible that the RSA host key has just been changed.
  7. The fingerprint for the RSA key sent by the remote host is
  8. 51:58:c2:b3:d3:7a:e6:bb:20:bd:5b:37:a1:87:cc:de.
  9. Please contact your system administrator.
  10. Add correct host key in /root/.ssh/known_hosts to get rid of this message.
  11. Offending key in /root/.ssh/known_hosts:1
  12. RSA host key for 192.168.0.88 has changed and you have requested strict checking.
  13. Host key verification failed.
Linux 就是好,有了錯誤它會提示您錯誤在哪,根據打印信息,我解決了這個問題。

使用超級用戶,為了進入 root/ 目錄:

  1. su
然後輸入超級用戶密碼,進入/root/目錄:
  1. cd /root
查看該目錄下面的所有文件,然後發現.ssh目錄,進入即可!
  1. ls -al
  2. cd .ssh/

在該目錄下面有個文件 known_hosts,使用 vim 打開該文件:

  1. vim known_hosts
刪除裡面的內容即可,如果你還怕出錯,在刪除內容之前可以備份!

再次使用 SSH 登錄,出現下面的信息:

  1. The authenticity of host '192.168.0.88 (192.168.0.88)' can't be established.
  2. RSA key fingerprint is 51:58:c2:b3:d3:7a:e6:bb:20:bd:5b:37:a1:87:cc:de.
  3. Are you sure you want to continue connecting (yes/no)?
yes 即可!搞定!
Copyright © Linux教程網 All Rights Reserved