事象
ターミナルから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の仮想サーバを切り替えた際に発生しました。