linux – 通过ssh连接到我的VPS时出现“违规密钥”警告
发布时间:2020-12-14 02:59:23 所属栏目:Linux 来源:网络整理
导读:当我执行: ssh root@myVPS 我收到了下一个警告: Warning: the RSA host key for 'myVPS' differs from the key for the IP address 'xxx.xx.xxx.xx'Offending key for IP in /home/manolo/.ssh/known_hosts:1Matching host key in /home/manolo/.ssh/known
当我执行:
ssh root@myVPS 我收到了下一个警告: Warning: the RSA host key for 'myVPS' differs from the key for the IP address 'xxx.xx.xxx.xx' Offending key for IP in /home/manolo/.ssh/known_hosts:1 Matching host key in /home/manolo/.ssh/known_hosts:2 Are you sure you want to continue connecting (yes/no)? 如果我输入“是”,我工作正常,但我不知道为什么会抛出这个警告. 解决方法
最有可能的是,您将在某个时刻重新安装VPS并保留主机名和/或IP地址.重新安装时,VPS的主机密钥已重新生成,因为它与?/ .ssh / known_hosts中的主机密钥不同,所以会显示警告,以便您可以检测到问题.这样做是为了防止您连接到替换合法主机的完全不同的系统,例如:收集密码.
如果发生类似的事情,只需从known_hosts文件中删除有问题的密钥,一切都很好,但如果你不知道这样的rinstall,你必须进一步调查,了解密钥的不同之处. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |