您当前的位置:首页 > 计算机 > 软件应用 > 网络应用

连接SFTP服务器报错host key for has changed and you have requested strict checking

时间:03-06来源:作者:点击数:

背景:今天连接SFTP的时候,报错如下,记录一下

报错如下

WARNING: REMOTE HOST IDENTIFICATION HSS CHANGED!cccececccccceeteeacaaeapepeppeeecpeepeeecepeeeaeeeeeceeeeeeIT 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 ED255l9 key sent by the remote host isSHA256:1tWdLrsyoNplkTz/3YzjCA6AKBtDYH7CUjTWlUpMSyA.Please contact your system administrator.Add correct host key in /home/wuzx/.ssh/known_hosts to get rid of this messageOffending EcDSA key in /home/wuzx/.ssh/known hosts:26Host key for [172.16,xxx,xxx]:1022 has changed and you have requested strict checkingHost key verification failed.Couldn't read packet: Connection reset by peer[wuzxeho4 shell]$
报错原因

重装系统后修改了密码,而ssh会把每次访问过的计算机的公钥都保存在~/.ssh/known_hosts文件中,当下次访问同样的计算机时,openssh会核对公钥,如果公钥不对,会发出警告

解决方案

删除~/.ssh/known_hosts文件中带有 报错IP的记录即可,然后就可以重新登录了

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门