问题现象
SSH登录远程服务器失败,提示信息如下:
~ ssh root@172.16.0.17@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 RSA key sent by the remote host isSHA256:qH+TOjxHIA7fxPyzFhfIJANIqe8Yj5ULUeKhucKO/lM.Please contact your system administrator.Add correct host key in /Users/shanshui/.ssh/known_hosts to get rid of this message.Offending RSA key in /Users/shanshui/.ssh/known_hosts:28RSA host key for 172.16.0.17 has changed and you have requested strict checking.Host key verification failed.
报错原因
17服务器近期迁移了,系统信息发生变更,现有的knownHost信息与新的服务器不匹配,故报错;
解决办法
- 删除konown Host信息,进入.ssh目录,删除文件;
- 使用
ssh-keygen -R 172.16.0.x重置konwn host信息; ``` ~ ssh-keygen -R 172.16.0.17Host 172.16.0.17 found: line 28
/Users/shanshui/.ssh/known_hosts updated. Original contents retained as /Users/shanshui/.ssh/known_hosts.old ➜ ~ ssh root@172.16.0.17 The authenticity of host ‘172.16.0.17 (172.16.0.17)’ can’t be established. ECDSA key fingerprint is SHA256:Wkmucog9S+hrvUcMXosQrUgpJpfQ5fug3EoluXqBaTc. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added ‘172.16.0.17’ (ECDSA) to the list of known hosts. root@172.16.0.17’s password: Last unsuccessful login: Fri Oct 9 14:10:28 CST 2020 on /dev/pts/4 from 172.16.28.173 Last login: Mon Oct 12 10:06:31 CST 2020 on /dev/pts/2 from 172.16.28.99
- *
- *
- Welcome to AIX Version 7.1! *
- *
- *
- Please see the README file in /usr/lpp/bos for information pertinent to *
- this release of the AIX Operating System. *
- *
- *
root@erpdb1:/#
``` 执行重置命令后,重新输入密码,登录成功
