在线将Ubuntu20.04升级到22.04后,ssh登录提示:
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
这是因为这是由于,ssh连接服务器时,如果之前连接过,ssh会默认保存该ip的连接协议信息,当我们再次访问此ip服务器时,ssh会自动匹配之前ssh保存的信息,由于我们的服务器做了更改,再次连接时就会出现上述错误。
直接修改本地用户.ssh目录下的known_hosts文件,查找服务器ip地址,将那一行删除即可。