SSH登陸錯誤"WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! "


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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
21:24:59:ba:53:d7:51:a2:12:13:40:09:53:03:5b:e6.
Please contact your system administrator.
Add correct host key in /home/cmccpay/.ssh/known_hosts to get rid of this message.
Offending key in /home/cmccpay/.ssh/known_hosts:11
RSA host key for 10.202.76.27 has changed and you have requested strict checking.
Host key verification failed.

 

出現該錯誤的解決方法:

  1. 因為在本地機器上曾經用SSH登錄過這台遠程計算機,因而留下了known_hosts的記錄,在遠程計算機重新安裝系統后不能夠通過鑒權。刪除~/.ssh/known_hosts中對應的項目,問題獲得解決。(很麻煩。。忽視之)
  2. 在客戶端執行下述指令即可:$mv ~/.ssh/known_hosts /tmp    (相對好一點,用過)
    再次登錄后會出現最初需要增加條目:
    The authenticity of host '128.112.139.3 (128.112.139.3)' can't be established.
    RSA key fingerprint is ce:78:c2:d5:26:11:42:cf:c6:e6:65:99:9c:60:51:34.
    Are you sure you want to continue connecting (yes/no)? The authenticity of host '132.170.3.32 (132.170.3.32)' can't be established.
    RSA key fingerprint is 91:14:9c:ea:e7:43:5d:8b:57:aa:51:57:e0:28:06:52.
    Are you sure you want to continue connecting (yes/no)? yes
  3. 配置文件進行配置,使出現“Warning: Host identification has changed!”時候可以自動更新~/.ssh/known_hosts中的相應條目,而不出現提示。(比較好!方便,無需后期處理)
    OpenSSH 有三種配置方式:命令行參數、用戶配置文件和系統級的配置文件("/etc/ssh/ssh_config")。命令行參數優先於配置文件,用戶配置文件優先於系統配置文件。所有的命令行的參數都能在配置文件中設置。因為在安裝的時候沒有默認的用戶配置文件,所以要把"/etc/ssh /ssh_config"拷貝並重新命名為"~/.ssh/config"。
    (下一篇中具體介紹ssh的配置文件)
    注意在配置文件~/.ssh/config中修改下面的內容:
    Host *
            GSSAPIAuthentication yes
            BatchMode yes
            StrictHostKeyChecking no           


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM