当两个设备第一次进行连接时,会把设备的公钥信息保存在~/.ssh/konwn_hosts中,后续再次连接时OpenSSH会核对公钥进行验证,如果被连接设备重装系统或者IP变更等原因都会导致公钥信息对不上从而报以下警告。
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 Exxxxx19 key sent by the remote host is
SHA256:JAKJS+xQ8lQ/kUpxxxxxxxxyDNdgVg4IeF+NUeY.
Please contact your system administrator.
Add correct host key in /Users/xubingtao/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xubingtao/.ssh/known_hosts:40
Host key for 1.9xxxxxx1 has changed and you have requested strict checking.
Host key verification failed.
这个时候我们可以删掉~/.ssh/konwn_hosts文件中对应IP的密文公钥信息,可以手动删除或执行“ssh-keygen -R 具体ip地址”即可重新连接Linux服务器了。
展开阅读全文
上一篇: Spring Boot升到3.2.0后运行项目报“Invalid value type for attribute ‘factoryBeanObjectType’: java.lang.String”
下一篇:解决CentOS Stream 9报Errors during downloading metadata for repository ‘baseos’