解决Host key verification failed.

「爱情、让人受尽委屈。」 2024-04-17 05:54 161阅读 0赞

ssh-keygen -R 你要访问的IP地址

例如

ssh-keygen -R 47.100.251.70

起因:

✘ liwei@MacBook-Pro  ~  ssh root@47.100.251.70
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
SHA256:UTPF6/wUyt6Xe13dUxi03MBYwmIq54Fz4tIxdN3U91g.
Please contact your system administrator.
Add correct host key in /Users/liwei/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/liwei/.ssh/known_hosts:6
RSA host key for 47.100.251.70 has changed and you have requested strict checking.
Host key verification failed.

ssh-keygen -R 47.100.251.70
# Host 47.100.251.70 found: line 6
/Users/liwei/.ssh/known_hosts updated.
Original contents retained as /Users/liwei/.ssh/known_hosts.old

ok

发表评论

表情:
评论列表 (有 0 条评论,161人围观)

还没有评论,来说两句吧...

相关阅读