1、报错信息如下:
// ***.***.***.**为主机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 ED25519 key sent by the remote host is
SHA256:L0f60iCVLuTnYICUPLpgWx13sT7SXQdz2Z3BSzRCw.
Please contact your system administrator.
Add correct host key in /Users/test/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/test/.ssh/known_hosts:17
Host key for ***.***.***.** has changed and you have requested strict checking.
Host key verification failed.
[Process completed]
2、原因:
服务器主机重新安装了系统,第一次SSH连接服务器时报错。
3、解决方法:
打开文件:/Users/test/.ssh/known_hosts
把上面对应IP地址的记录行删除即可。
如下3行:
SSH重新连接登录即可。