如何在 Chromebook 當中移除 SSH 的 Know_Host Fingerprints
最近買了一台 Chromebook,想試試看自己可不可能利用 chromebook 來處理日常生活的所有工作,當然電動不包含在內。目前看起來使用似乎沒有問題,何況也逐漸支援 android app,可以做的事情應該是越來越多了。
今天要記錄的是如何移除 SSH 連線的 Known Host Fingerprint。當已知客戶端的 fingerprint 遭到變更時,會出現下面的訊息:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
d6:be:12:7e:22:23:c3:e1:56:30:d6:cd:65:b7:ab:42.
Please contact your system administrator.
Add correct host key in /.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /.ssh/known_hosts:7
ECDSA host key for xxxxxxxxxxxxx.yyy.au has changed and you have requested strict checking.
Host key verification failed.
NaCl plugin exited with status code 255.
在 Linux 底下的處理十分簡單,打開 ~/.ssh/known_hosts 的檔案並刪除第7行即可。問題是要如何在 chromebook 裡面該如何做呢?畢竟 chromebook 裡面又沒有 vi 以及 terminal ...
解決的方法如下:
今天要記錄的是如何移除 SSH 連線的 Known Host Fingerprint。當已知客戶端的 fingerprint 遭到變更時,會出現下面的訊息:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
d6:be:12:7e:22:23:c3:e1:56:30:d6:cd:65:b7:ab:42.
Please contact your system administrator.
Add correct host key in /.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /.ssh/known_hosts:7
ECDSA host key for xxxxxxxxxxxxx.yyy.au has changed and you have requested strict checking.
Host key verification failed.
NaCl plugin exited with status code 255.
在 Linux 底下的處理十分簡單,打開 ~/.ssh/known_hosts 的檔案並刪除第7行即可。問題是要如何在 chromebook 裡面該如何做呢?畢竟 chromebook 裡面又沒有 vi 以及 terminal ...
解決的方法如下:
- 打開 Javascript console (ctrl + shift + j )
- 輸入 term_.command.removeKnownHostByIndex(INDEX);
- 如果是輸入 term_.command.removeAllKnownHosts(); 則會清空所有的 known_hosts entry
不過還有哪些指令可以用呢 ...
ssh-keygen -R 1.2.3.4
回覆刪除還是一樣覺得很麻煩,想知道有沒有更方便的方式