今天處理GPU伺服器時,正準備將配置檔透過SSH發佈到各台主機上時發生了「WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!」,後面接一連段英文如下 : 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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 這裡依每台電腦而不同 Please contact your system administrator. Add correct host key in /home/conbar/.ssh/known_hosts to get rid of this message. Offending key in /home/conbar/.ssh/known_hosts:10 RSA host key for 這裡是伺服器端的IP或網址 has changed and you have requested strict checking. Host key verification failed.

會出現這訊息是因為,第一次SSH連現時,會生成一個認證,儲存在客戶端(也就是用SSH連線其他電腦的那個,自己操作的那個)中的known_hosts,但是如果伺服器端重灌過了,認證資訊當然也會更改,伺服器端與客戶端不同時,就會跳出錯誤啦~因此,只要把電腦中的認證資訊刪除,連線時重新生成,就能解決囉,只要在客戶端輸入一個指令

      ssh-keygen -R 遠端伺服器的IP或網址    

 接下來在連線一次,會出現

      Are you sure you want to continue connecting (yes/no)?  yes  

 輸入yes,就完成連線啦!同時,新的認證也生成了

arrow
arrow
    全站熱搜

    忽倫 發表在 痞客邦 留言(1) 人氣()