2018.4.19 远程服务器重装系统之后ssh无法登陆问题

当我们重装云服务器系统的时候输入ssh连接命令(ssh dc2-user@116.85.25.15)出现一下代码

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:lmwBveuC78QBzZBIEDPXgoNI0J58cT8u9k4A3Yh6+wQ.
Please contact your system administrator.
Add correct host key in /home/qichunlin/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/qichunlin/.ssh/known_hosts:1
  remove with:
  ssh-keygen -f "/home/qichunlin/.ssh/known_hosts" -R 116.85.25.15
ECDSA host key for 116.85.25.15 has changed and you have requested strict checking.
Host key verification failed.

解决办法是删除下面的主机文件重新链接

rm -rf ~/.ssh/known_hosts

这个简单会把其他正确的公钥信息也删除,下次链接要全部重新经过认证

再输入一次上面链接远程服务器的连接
就OK了

posted @ 2018-04-19 09:42  LegendQi  阅读(958)  评论(1编辑  收藏  举报