如何修复树莓派在更换了一个 SD 系统卡后,无法使用 SSH 登录问题 All In One
known
hosts
Raspberry Pi
无法 SSH 登录,报错 ❌
/Users/xgqfrms-mm/.ssh/known_hosts
$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:OSm7xD6bEquDahA8bP4syFSsZNgUpsg70HfiSuj5A8Q.
Please contact your system administrator.
Add correct host key in /Users/xgqfrms-mm/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xgqfrms-mm/.ssh/known_hosts:6
Host key for raspberrypi.local has changed and you have requested strict checking.
Host key verification failed.
solution
# 查看
$ cat /Users/xgqfrms-mm/.ssh/known_hosts
# 修改/删除
$ sudo code /Users/xgqfrms-mm/.ssh/known_hosts
# $ sudo vim /Users/xgqfrms-mm/.ssh/known_hosts
# $ sudo nano /Users/xgqfrms-mm/.ssh/known_hosts