今天重新刷了野火的鲁班猫4,结果导致vscode remote无法登陆
报警信息如下:
[08:56:44.137] > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[08:56:44.165] > @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> The ECDSA host key for lubancat has changed,
> and the key for the corresponding IP address fe80::a609:ecb1:aa72:b90d%15
> is unknown. This could either mean that
> DNS SPOOFING is happening or the IP address for the host
> and its host key have changed at the same time.
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @ 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:+0hETDJN9EkajG2fJ3y2yPkpslEns9VjEkEHVE8ykCE.
> Please contact your system administrator.
> Add correct host key in C:\\Users\\Admin/.ssh/known_hosts to get rid of this mes
> sage.
> Offending ECDSA key in C:\\Users\\Admin/.ssh/known_hosts:11
> ECDSA host key for lubancat has changed and you have requested strict checking.
> Host key verification failed.
> 过程试图写入的管道不存在。
分析原因发现
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:+0hETDJN9EkajG2fJ3y2yPkpslEns9VjEkEHVE8ykCE.
这一段警告信息,在网上查询发现
这是由于,ssh连接服务器时,如果之前连接过,ssh会默认保存该ip的连接协议信息,当我们再次访问此ip服务器时,ssh会自动匹配之前ssh保存的信息,由于我们的服务器做了更改,例如重装系统等操作,会导致本地保存的ssh信息失效,于是再次连接时就会出现上述错误。
另外,远程服务器的ssh服务被卸载重装或ssh相关数据(协议信息)被删除也会导致这个错误。
解决方案:
删除本地known_hosts里面的缓存信息即可。命令:ssh-keygen -R “你的远程服务器ip地址”
注意:R是大写!