解决 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED
今天在阿里云租了一台 ECS,配置和公钥之后在本地尝试登陆发现报如下错误:
```
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:j+dVtJEPUR8/YQHMtQYHbJLIuvAMzfknM5lB+56dJoo.
Please contact your system administrator.
Add correct host key in /Users/xxx/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xxx/.ssh/known_hosts:66
ECDSA host key for 123.57.87.200 has changed and you have requested strict checking.
Host key verification failed.
```
发现其实是我之前配置过一次然后重置了 ECS 导致的,只要删掉 known_hosts 第 66 行的记录就正常了。
版权声明: 本文为 InfoQ 作者【邵俊达】的原创文章。
原文链接:【http://xie.infoq.cn/article/abbd1682a777212b4f767be87】。
本文遵守【CC-BY 4.0】协议,转载请保留原文出处及本版权声明。
评论