事件:重新装了一下服务器centOS,再次用本地shh链接时报错,错误如下
$ ssh root@118.25.176.66
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:8hgJ8jpcBr1tm6HS72FpXwMrjba8MQqlqYJQLPB/Qf4.
Please contact your system administrator.
Add correct host key in /Users/wangdong/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/wangdong/.ssh/known_hosts:26
ECDSA host key for 47.98.233.15 has changed and you have requested strict checking.
Host key verification failed.
---------------------
版权声明:本文为CSDN博主「熊本同学」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wd2014610/article/details/79945424
查询了一下百度才知道需要删除原先shh本地配置,原地址:https://blog.csdn.net/wd2014610/article/details/79945424
解决办法:
1.编辑known_hosts
vi /Users/zhouhongxi/.ssh/known_hosts
2.删除对应链接信息,如红框
删除实例.png
3.再次链接
ssh root@118.25.176.66
vi 编辑 按i进入编辑模式 编辑好之后按esc 再按:wq 保存退出
网友评论