https://baijiahao.baidu.com/s?id=1762795564128954284&wfr=spider&for=pc
#rsa证书
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
#ed25519证书
ssh-keyscan -t ed25519 192.168.110.52 >> ~/.ssh/known_hosts
ssh-keyscan -t ed25519 -f ~/.ssh/id_ed25519_x205 192.168.110.52 >> ~/.ssh/known_hosts
#查看主机 SSH 公钥,并输出调试信息
ssh-keyscan -v 127.0.0.1
ssh-keyscan -v 192.168.110.52
ssh-keygen -R server_ip_address
ssh-keyscan -H server_ip_address >> ~/.ssh/known_hosts
rm -f ~/.ssh/known_hosts
编辑 ~/.ssh/known_hosts 文件,将目标ip公钥信息删除后保存即可