MacのターミナルからRSA鍵を再設定して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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX.
Please contact your system administrator.
Add correct host key in /Users/decobisu/.ssh/known_hosts to get rid of this message.
Offending key in /Users/decobisu/.ssh/known_hosts:1
RSA host key for decobisu.hogehoge.net has changed and you have requested strict checking.
Host key verification failed.
RSA鍵が違うらしい。以前に繋いだ時に設定した鍵が~/.ssh/known_hostsに登録されているので再設定したものと違っている。ファイルのエラーが出てる以前登録したホストの行を消せばよい。
改めて繋ぐ時に
Are you sure you want to continue connecting (yes/no)?
と聞かれるのでyesだと新しい鍵がknown_hostsに登録される。