[ssh]错误:RSA host key for xxx has changed and you have requested strict checking.


今天连接ssh到服务器出现这个问题,服务器明明也配置了公钥的

后来查资料发现解决方法:

  • 命令行调用如下命令
ssh-keygen -R HOST_IP        (HOST_IP替换成你的服务器的IP)

返回

Host xxx found: line 6

/Users/xxx/.ssh/known_hosts updated.
Original contents retained as /Users/xxx/.ssh/known_hosts.old

这个就是正常的

  • 然后再次ssh
ssh root@xxx

这次就OK了

你可能感兴趣的:([ssh]错误:RSA host key for xxx has changed and you have requested strict checking.)