UBUNTU(LINUX) 下,SSH 指令以及 "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" 問題排除




SSH 連線指令:

# ssh 登入帳號名稱@登入位址IP

   ex: ssh ex123@52.167.88.255

若主機為了安全,更改了原本固定埠口 22,指令改成

# ssh -p 主機埠口 登入帳號名稱@登入位址IP


   ex: ssh -p 2200 ex123@52.167.88.255






======================================================

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 a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
1c:ef:2c:50:fa:2b:d1:40:8c:ea:d5:2f:13:4b:d1:4f.
Please contact your system administrator.
Add correct host key in /home/george/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/george/.ssh/known_hosts:5
  remove with: ssh-keygen -f "/home/george/.ssh/known_hosts" -R XXX.XXX.XX.XXX
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
X11 forwarding is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password).




經過GOOGLE後,只要 修改 .gedit ~/.ssh/known_hosts 這檔案,把相關訊息用 # 註解掉即可。

錯誤原因似乎跟之前登入的紀錄有關,儲存了錯誤的密碼,總之只要刪掉,連線時會重新製造即可。。。。。

留言

這個網誌中的熱門文章

解決羅技無線滑鼠找不到驅動,並顯示 USB Receiver 問題

解決 MYSQL 登入時,ERROR 1045 (28000) using password: NO 的方法

Windows 10 系統更新後,MSI NB 喇叭 爆音/破音/破聲 問題