目次
「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 ED25519 key sent by the remote host is
SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Please contact your system administrator.
Add correct host key in /Users/XXXXXXXXXX/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /Users/XXXXXXXXXX/.ssh/known_hosts:12
Host key for 192.168.0.254 has changed and you have requested strict checking.
Host key verification failed.
もし、上記のようなエラーが出た場合は、
「ssh-keygen」コマンドで情報を消して再度実行すると対処できます。
# SSH接続がエラーになった「IPアドレス」を入力
$ ssh-keygen -R 192.168.0.254
# Host 192.168.0.254 found: line 12
/Users/XXXXXXXXXX/.ssh/known_hosts updated.
Original contents retained as /Users/XXXXXXXXXX/.ssh/known_hosts.old
あとは、通常通りにSSH接続をすればOKです。