最近给软路由重装完固件连接时发现ssh报错,如下

 1C:\Users\yzh>ssh root@192.168.8.1
 2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 3@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
 4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 5IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
 6Someone could be eavesdropping on you right now (man-in-the-middle attack)!
 7It is also possible that a host key has just been changed.
 8The fingerprint for the ED25519 key sent by the remote host is
 9SHA256:uSgAcKy0NKevdMFprVPlHaajR6Bg.
10Please contact your system administrator.
11Add correct host key in C:\\Users\\yzh/.ssh/known_hosts to get rid of this message.
12Offending ED25519 key in C:\\Users\\yzh/.ssh/known_hosts:5
13ED25519 host key for 192.168.8.1 has changed and you have requested strict checking.
14Host key verification failed.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
警告:远程主机标识已更改!
这个报错主要是因为远程主机的ssh公钥发生了变化,两边不一致导致的

删除本地对应ip的在known_hosts相关信息

删除之后重新连接,成功!

个人笔记记录 2021 ~ 2025