处理 GitHub 更新 RSA SSH host key 导致的问题
问题
在 2023-03-23 GitHub 出于安全原因更新了他们的 RSA SSH host key,如果你使用的是 ECDSA 或者 Ed25519 keys 则不需要任何操作,如果你是通过 RSA key SSH 连接的 GitHub 则可能会显示类似以下信息:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
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 RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in /Users/Joker/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/Joker/.ssh/known_hosts:1
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.