登录远程Linux服务器:报Host key verification failed错误

远程Linux服务器,报Host key verification failed错误。
问题:使用其他电脑登录远程Linux服务器,可以登录,但其中一台电脑登录时报该错误。
原因:是因为登录服务器时主机会把它的服务器登录标识证书记录下来,下次登录时会去比对之前的记录,由于系统重装,标识变了导致不能继续登录。
解决:在客户端执行命令:ssh-keygen -R 要登录的服务器ip

错误详情和解决:

LOVE:~ han$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
7d:df:32:b0:dd:56:cb:ab:7b:4e:c1:40:84:6a:49:c2.
Please contact your system administrator.
Add correct host key in /Users/han/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/han/.ssh/known_hosts:10
RSA host key for 110.211.114.117 has changed and you have requested strict checking.
Host key verification failed.
LOVE:~ han$ ssh-keygen -R 110.211.114.117
# Host 111.231.144.197 found: line 10 type RSA

/Users/hanzhaoyang/.ssh/known_hosts updated.
通过以上就可以解决问题。

猜你喜欢

转载自blog.51cto.com/59465168/2299697