背景:今天连接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的记录即可,然后就可以重新登录了