如题,最近双11买了阿里云服务器,然后倒腾。
由于一系列我自己的无法理解的操作之后,恐将服务器搞坏,打算重置服务器。于是,进行了如下操作:
选中自己要重置的阿里云服务实例-》停止实例-》更多=》磁盘和镜像-》重新初始化磁盘
一波操作之后,重新启动服务器,然后准备右键新建远程连接。开开心心准备通过ssh远程链接服务器。结果发现报错如下:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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:M3gbfQPCs8Y/y07otgS5BtZM9kSrCGYznCdatU2XF2g. Please contact your system administrator. Add correct host key in /Users/zhangyanling/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/zhangyanling/.ssh/known_hosts:2 ECDSA host key for 47.110.54.75 has changed and you have requested strict checking. Host key verification failed.
大概猜了一下原因,远程host定义已经被更改。还是一脸懵逼啊,不说了,赶紧复制错误信息搜索一波。得到解决办法如下:
地址链接:https://www.digitalocean.com/community/questions/warning-remote-host-identification-has-changed
ssh-keygen -R <host>
比如,
ssh-keygen -R 192.168.3.10
然后就搞定了!