本文最后更新于 254 天前,其中的信息可能已经有所发展或是发生改变。
有时候我们会重装服务器、更新服务器密码,那么需要删除原来的旧sshkey才可以连接,不然会报错
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:O1EndUuzBDePDr6otIFrGveybYlKOpoRHMYwYCnlhHQ.
Please contact your system administrator.
Add correct host key in C:\\Users\\xxxx/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\xxxx/.ssh/known_hosts:11
Host key for xx.xx.xx.xx has changed and you have requested strict checking.
Host key verification failed.
我们可以执行以下命令删除老的key
ssh-keyGen -R xx.xx.xx.xx
# 输出:
# Host xx.xx.xx.xx found: line 9
# Host xx.xx.xx.xx found: line 10
# Host xx.xx.xx.xx found: line 11
C:\Users\xxxx/.ssh/known_hosts updated.
Original contents retained as C:\Users\xxxx/.ssh/known_hosts.old