➜ ~ ssh admin@172.21.2.37
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:HWqz3jGEbt4lRHdnuu6WeEbrfMZLrLfwh0c6oOYh714.
Please contact your system administrator.
Add correct host key in /Users/luyefeng/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/luyefeng/.ssh/known_hosts:98
Host key for 172.21.2.37 has changed and you have requested strict checking.
Host key verification failed.
解决方法:
use ssh-keygen to delete the invalid key
ssh-keygen -R “you server hostname or ip”
解决
方法二:
- 进入 vim ~/.ssh/known_hosts
- 删掉主机ip地址相关的信息,入删掉172.2.21.37的内容
参考文章:https://www.digitalocean.com/community/questions/warning-remote-host-identification-has-changed