6
3

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 5 years have passed since last update.

Raspberry PiにSSHで "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" エラー

Posted at
株式会社XSHELL デベロッパー 植田歩

環境

  • mac OS X El Capitan
  • Raspberry Pi 3
  • OS 2017-08-16-raspbian-stretch-lite.img

概要

ssh接続しようとした時にエラーが出て繋がらない。


user-no-MacBook-Air-2:git user$ ssh pi@192.168.0.10

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ECDSA key sent by the remote host is
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
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:54
ECDSA host key for 192.168.0.10 has changed and you have requested strict checking.
Host key verification failed.
  • 何台もRaspberry Piを使ったりしているとよくなる。
  • 別にRaspberry Piだからなるわけではない。
  • あと厳密にいうとエラーというよりか警告。
  • 直さないと進めないので気持ち的にはエラー。

手順


# 鍵作成
ssh-keygen -R 192.168.0.10

# 成功
user-no-MacBook-Air-2:git user$ ssh-keygen -R 192.168.0.10
# Host 192.168.0.10 found: line 54
/Users/user/.ssh/known_hosts updated.
Original contents retained as /Users/user/.ssh/known_hosts.old

# 接続時に聞かれる質問はyes
Are you sure you want to continue connecting (yes/no)? yes

株式会社XSHELL デベロッパー 植田歩

XSHELLはSBCを使いやすくするソリューションを提供しています。
isaaxIoTitぜひご使用になってご意見を頂きたく思います。
共に素晴らしいプロジェクトを実現させましょう!


6
3
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
6
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?