[email protected] p 但是有报错,如下: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION ...">

当前位置:网站首页>Day 246/300 ssh连接提示“REMOTE HOST IDENTIFICATION HAS CHANGED! ”

Day 246/300 ssh连接提示“REMOTE HOST IDENTIFICATION HAS CHANGED! ”

2022-07-06 06:28:00 Arden Zhao

(一)需求

我想连接远程服务器免密登录和命令行都报错ssh [email protected] - p但是有报错,如下:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:vdHz3zOlFnQs/O+IkQCmN8FjCUSHJsKgVkD1+7KvmlA.
Please contact your system administrator.
Add correct host key in /Users/zhaoarden/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /Users/zhaoarden/.ssh/known_hosts:14
Host key for 47.93.247.224 has changed and you have requested strict checking.
Host key verification failed.

(二)分析

SSH会将访问过的公钥都缓存在(public key);
下次访问时,SSH 会核对公钥,如果不对,会报错提示。
以免收到DNS的等攻击;

(三)解决方法

Mac版,找到known_hosts文件,/Users/zhaoarden/.ssh/known_hosts

删除对应IP对应的公钥就OK了。

再次连接可以了。

写在最后的话

学习路上,常常会懈怠《有想学技术需要监督的同学嘛~》

https://mp.weixin.qq.com/s/FyuddlwRY7DsHUejCjiVug

参考链接

https://cloud.tencent.com/developer/article/1508166

原网站

版权声明
本文为[Arden Zhao]所创,转载请带上原文链接,感谢
https://blog.csdn.net/xinghuowuzhao/article/details/125205143