SSH连接失败

我一开始连接了一台服务器通过ssh,后来换了另一台服务器连接就报错了:

C:\Users\***>ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:JSwFTyaec1QcwW+rebu9xCJluVfYgwGYVfGZLWzLx/o.
Please contact your system administrator.
Add correct host key in C:\\Users\\***/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\***/.ssh/known_hosts:1
ECDSA host key for 10.0.45.254 has changed and you have requested strict checking.
Host key verification failed.

原因是系统本地保存了上一台服务器的认证信息,没有更换,导致验证时出错。

解决办法,更新一下认证信息,或者把之前的删除。

ssh-keygen -R 10.0.45.254

 更新完就可以正常登录了。

-------------------------------------------------------------------------------------------------------------------------------

如果还不好使,建议下个putty,真香。

你可能感兴趣的:(软件安装问题,SSH)