一. 远程时若出现如下提示:
- mac命令行登录
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:UCYqpiB/MxXgL97NAvqojoRHGghI2WVxxx
Please contact your system administrator.
Add correct host key in /Users/tica/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/tica/.ssh/known_hosts:35
Host key for 192.168.xx.xx has changed and you have requested strict checking.
Host key verification failed.
2.mac 工具(如vs)连接出现如下提示:
Could not establish connection to "192.168.xx.xx": Remote host key has changed, port forwarding is disabled.
则说明是远程连接的认证信息失效了。
原因之一: 目标服务器重装了,故需要调整客户端连接信息。
二. 解决方案
- 参考mac命令行连接错误信息提示,进行操作即可。即:删除本地的旧的连接认证信息即可。
- 具体操作如下: