$ ssh root@10.3.0.115
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:CIxWlug9vwd2jdlatMmp1+xWXORX8oD8Kj6l9RKuosA.
Please contact your system administrator.
Add correct host key in /Users/zoe/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/zoe/.ssh/known_hosts:11
ECDSA host key for 10.3.0.115 has changed and you have requested strict checking.
Host key verification failed.
known_hosts是记录远程主机的公钥的文件,之前重装个系统,而保存的公钥还是未重装系统的系统公钥,在ssh链接的时候首先会验证公钥,如果公钥不对,那么就会报错,
解决办法:
$ sudo vi ~/.ssh/known_hosts
1、将known_hosts文件中的与登录错误的IP的公钥删除即可
2、再次ssh登陆即可。
网友评论