17
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ssh接続して「REMOTE HOST IDENTIFICATION HAS CHANGED!」と表示され接続できない際の対処

17
Posted at

事象

ターミナルからssh接続した際に下記のエラーメッセージが表示され、接続できない。

terminal
$ ssh 192.168.1.101
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
4d:4c:ae:ae:74:5e:df:65:11:79:27:4c:01:d5:14:20.
Please contact your system administrator.
Add correct host key in /c/Users/korenaga_makoto/.ssh/known_hosts to get rid of this message.
Offending key in /c/Users/user_name/.ssh/known_hosts:12
RSA host key for 192.168.1.101 has changed and you have requested strict checking.
Host key verification failed.

原因

指定したホスト名に過去に接続したことがあり、その際のRSAキーのフィンガープリントと異なる為。

解決策

自身のユーザフォルダ内の.ssh/known_hostsを編集し、接続しようとしていたホスト名の行を削除する

備考

今回はVirtualBoxの仮想サーバを切り替えた際に発生しました。

17
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?