乐趣区

关于ssh:Day-80100-ssh连接提示REMOTE-HOST-IDENTIFICATION-HAS-CHANGED

(一)需要

我想连贯近程服务器免密登录和命令行都报错 ssh root@ip - 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/Fy…

参考链接

https://cloud.tencent.com/dev…

退出移动版