阿里云主机--重置系统后的登录问题
今天在把阿里云服务器的磁盘格式化之后,然后windows系统上,在gitbash上用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:o2C1yCSeP9SeB0dCwDYPnvu9V2JY1C0kiqiPbh1pfWQ.
Please contact your system administrator.
Add correct host key in /c/Users/gengyufei/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /c/Users/gengyufei/.ssh/known_hosts:1
ECDSA host key for 39.106.185.75 has changed and you have requested strict checking.
Host key verification failed.
解决方案:
1、指令:cat ~/.ssh/known_hosts
出现以下界面:
39.xxx.xxx.75 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBB7p/tpYTMRM8tynWcP9uxjvaU7D/3KVohP0Qm2kw/vrrqaRA66obLRujyhmYVIzI6HmoK5xof8Tx49DjbkK3U8=
2、我的服务器IP地址为:39.xxx.xxx.75,执行以下命令,将其历史保留记录删除,然后保存重新用ssh登录服务器即可
命令:vim ~/.ssh/known_hosts
原文地址:https://www.cnblogs.com/gengyufei/p/11668034.html