#navi(../)
* WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! [#i6128cc6]
いつものようにサーバに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
このメッセージが表示される状態は、サーバの入れ替えなどにより出力されます。
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
#br
** 対応方法 [#a1a73473]
ホームディレクトリの.sshディレクトリ内にknown_hostsファイルがあります。($HOME/.ssh/known_hosts)~
これをエディタで開き接続先のホスト名またはIPアドレスが記述されている行を削除し保存します。~
以下のスクリーンショットはknown_hostsです。~
各IP(またはホスト名)で鍵が保存されています。赤色で囲んだ範囲がサーバ毎の鍵になります。~
(画面が小さいため複数行に見えますが1つの赤色で囲んだ範囲は1行で構成されています)
#ref(known_hosts.gif)
再度接続すると以下のメッセージが表示されるので、yesを入力します。
The authenticity of host '192.168.xx.xx (192.168.xx.xx)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)?
#br
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
#br