@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:zebBC9Dd3F8jBT+Zo28AWBMMm88EJuhJsY2lIqwbHHE.
Please contact your system administrator.
Add correct host key in /Users/piniing/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/piniing/.ssh/known_hosts:98
ECDSA host key for xx.xx.xx.xx has changed and you have requested strict checking.
Host key verification failed.
@ 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:zebBC9Dd3F8jBT+Zo28AWBMMm88EJuhJsY2lIqwbHHE.
Please contact your system administrator.
Add correct host key in /Users/piniing/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/piniing/.ssh/known_hosts:98
ECDSA host key for xx.xx.xx.xx has changed and you have requested strict checking.
Host key verification failed.
远程连接出现这个问题,秘钥正确也出现这个问题;
查找服务器的.ssh/hosts这个文件,没发现这个文件,排除不是这个问题
查阅其他资料,出现这个是因为第一次远程ssh连接是时候,会生成一个认证,储存在客户端的known_hosts
因为这台服务器重装过,认证的信息就会改变,服务器和客户端的认证不同步,就会出现这个错误
只要把客户端的认证信息删掉,重新生成就可以了!
客户端执行下面的命令:
ssh-keygen -R xx.xx.xx.xx
xx.xx.xx.xx(你要远程的服务器的IP)
然后再次远程ssh连接:
Are you sure you want to continue connecting (yes/no)?
输入yes,就可以了~