0
0

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 1 year has passed since last update.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Posted at

事象 : .ssh/configに「HostkeyAlgorithms」を追記してからssh接続しようとしたら怒られた

ホストの公開鍵の種類を「HostkeyAlgorithms」で追加して、ssh接続しようとしたら・・・

$ ssh old-host
Enter passphrase for key '/path/to/fumidai.pem': 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 DSA key sent by the remote host is
SHA256:....
Please contact your system administrator.
Add correct host key in /c/Users/ponsuke/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/ponsuke/.ssh/known_hosts:27
Host key for 10.0.x.xx has changed and you have requested strict checking.
Host key verification failed.

原因 : known_hostsにある情報と接続しようとしている情報が違うから

メッセージをざっくり訳すと・・・

「誰かが何か悪さをしている可能性があります。今まさに盗聴されているかもしれない(中間者攻撃)!また、ホストの鍵が変更されただけということもありえます。.....」

何か心配されている感じ。

対応 : 古い情報をknown_hostsから消してあげる

$ ssh-keygen -R 10.0.x.xx
# Host 10.0.x.xx found: line 27
/c/Users/ponsuke/.ssh/known_hosts updated.
Original contents retained as /c/Users/ponsuke/.ssh/known_hosts.old

# ssh接続時に、再度known_hostsが更新される
$ ssh old-host
Enter passphrase for key '/path/to/fumidai.pem': 
The authenticity of host '10.0.x.xx (<no hostip for proxy command>)' can't be established.
DSA key fingerprint is SHA256:...
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.0.x.xx' (DSA) to the list of known hosts.
Enter passphrase for key '/path/to/id_rsa': 
sign_and_send_pubkey: no mutual signature supported
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?