1
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.

[MacOS]ssh接続の際、リモートホストの識別エラー

Posted at

経緯

MacOSからwsl(ubuntu)へssh接続しようとした際、なかなかうまくいかず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:aoisudhfaeirgjbriubseubhrdjbslid.
Please contact your system administrator.
Add correct host key in /Users/user/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/user/.ssh/known_hosts:7
Host key for [ip]:port has changed and you have requested strict checking.
Host key verification failed.

解決策

~/.ssh/known_hostsのファイルを削除することでホストの再登録ができる。

rm ~/.ssh/known_hosts

1
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
1
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?