解决登录服务器报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
背景
登录服务器的时候报错:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:Rx6iw9pyKHV+bivfJjzwEP76aIZ14kW9YsucxZMzwo0.
Please contact your system administrator.
Add correct host key in /Users/didi/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/didi/.ssh/known_hosts:6
ECDSA host key for 192.168.191.129 has changed and you have requested strict checking.
Host key verification failed.
原因
远程服务器的key发生了改变
解决
更新key:
ssh-keygen -R <服务器ip>