ECDSA host key for ... has changed and you have requested strict checking.Host key verification fail

一、背景

因为公司机器映射到公网,遭到攻击,正常输入密码,登录不上。最终选择了重装系统。装完系统,跟往常一样登录vscode,发现一直登不上,报错:ECDSA host key for… has changed and you have requested strict checking.Host key verification fail。记录下解决步骤:

ECDSA host key for… has changed and you have requested strict checking.Host key verification fail。

ECDSA host key for ... has changed and you have requested strict checking.Host key verification fail_第1张图片

二、解决方法

方法一:在windows下 cmd 输入: ssh-keygen -R “远程服务器ip地址” ,清除当前机器缓存的之前的公钥信息。然后vscode重新连接即可。若是没解决尝试方法二:

方法二
在vscode终端机器上找known_hosts文件。找到后直接删除对应ip的记录。
ECDSA host key for ... has changed and you have requested strict checking.Host key verification fail_第2张图片
假如你的远程机器ip是192.168.10.226,删除该条记录,在用vscode连接就Ok了
在这里插入图片描述

参考连接:https://blog.csdn.net/qq_31747765/article/details/82414278

你可能感兴趣的:(ssh,linux)