今天登录堡垒机发现 ssh 登录失败,报错如下所示
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ED25519 key sent by the remote host is
SHA256:xxxxzU3o.
Please contact your system administrator.
Add correct host key in /home/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/.ssh/known_hosts:3
Host key for xxx.com has changed and you have requested strict checking.
Host key verification failed.
解决方案:
vim /home/.ssh/known_hosts
删除 xxx.com 变化的那一行,然后重新登录
sudo ssh user@xxx.com
注意,大多数情况下 再次登录需要加 sudo,因为要往.ssh/known_hosts 里写数据
- IDENTIFICATION WARNING CHANGED REMOTE HOSTidentification warning changed remote identification changed warning remote identification warning changed办法 identification warning changed服务器 identification warning changed方法 identification错误warning changed identification错误changed remote 密钥identification changed remote identification changed代码github quot ssh_exchange_identification host identification