1.在重置服务器后出现$ ssh -i /c/aliyun/key.pem root@xx.xx.xx.xx
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
...
Host key verification failed.
解决方法:
-
方法一:
rm -rf ~/.ssh/known_hosts
++++++++++++++++++
优点:干净利索
缺点:把其他正确的公钥信息也删除,下次链接要全部重新经过认证
-
方法二:
vi ~/.ssh/known_hosts
删除对应ip的相关rsa信息(本例可知删除53行信息即可)
++++++++++++++++++
优点:其他正确的公钥信息保留
缺点:还要vi,还要找到对应信息,稍微优点繁琐
-
方法三:
清除旧的公钥信息
ssh-keygen -R 192.168.0.100
++++++++++++++++++
优点:快、稳、狠
缺点:没有缺点