mac使用终端连接服务器错误:ECDSA host key for [ip address] has changed and you have requested strict checking解决

笔者在使用mac终端连接阿里云服务器时提示如下错误,后面是解决方案:

错误信息:

zhoujunhongdeMacBook-Pro:~ zhoujunhong$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ECDSA key sent by the remote host is
SHA256:tE9JpvFwRw2prOejVqb8H1eWhqWZLzSQ2z8zVseNaOc.
Please contact your system administrator.
Add correct host key in /Users/zhoujunhong/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/zhoujunhong/.ssh/known_hosts:20
ECDSA host key for 39.108.68.29 has changed and you have requested strict checking.
Host key verification failed.

截图

解决方案:

修改本地.ssh下的host文件即可。

操作如下:

 

猜你喜欢

转载自blog.csdn.net/zjh_746140129/article/details/82667397