RSA host key has changed 错误

报错信息如下:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 RSA key sent by the remote host is
SHA256:***.
Please contact your system administrator.
Add correct host key in /Users/***/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/***/.ssh/known_hosts:2
RSA host key for *** has changed and you have requested strict checking.
Host key verification failed.

因为在阿里云上更换了一下镜像,所以再次连接时报错,解决方案如下:

ssh-keygen -R IP  

把IP替换成你的真实地址即可。


版权声明:本文为u010358168原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。