sshong 2020-06-12
ssh 远程登录 REMOTE HOST IDENTIFICATION HAS CHANGED 问题
问题:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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 is da:f7:3e:ba:f7:00:e6:44:76:f2:58:6e:48:******. Please contact your system administrator. Add correct host key in /home/name/.ssh/known_hosts to get rid of this message. Offending RSA key in /home/name/.ssh/known_hosts:17 RSA host key for xx.xx.xx.xx has changed and you have requested strict checking. Host key verification failed.
原因:
由于服务器重新安装系统了,所以会出现以上错误。
解决方式:
ssh-keygen -R 服务器端的ip地址
会出现以下提示
# Host [服务器IP] found: line 17 type RSA /home/name/.ssh/known_hosts updated. Original contents retained as /home/name/.ssh/known_hosts.old
重新连接服务器即可
那么 ssh-keygen
命令是什么:
该命令的作用是:生成 SSH 秘钥对