客户端系统:Ubuntu / Windows10
远程服务器系统: Ubuntu18.04 LTS(64bit)

1.错误提示信息:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:QcZvQsroL6DTy40whaaGBe3cn/jnNeAlREiyDMsSRWE.
Please contact your system administrator.
Add correct host key in C:\\Users\\Cecil/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\Cecil/.ssh/known_hosts:2
ECDSA host key for 192.168.1.2 has changed and you have requested strict checking.
Host key verification failed.

2.原因分析:
域名解析失败,当第一次连接vps时,会在本地生成关于连接协议的信息,vps上也有一份对应的信息,而当vps重装系统之后,与本地ssh连接协议相关的信息就没了,本地ssh就无法连接上vps了

3.解决方法:
在终端上使用下面的命令将相关的信息清除,然后再连接:

ssh-keygen -R 192.168.1.2

ssh root@192.168.1.2