您的位置:首页 > 其它

RSA host key has changed(SSH 远程无法使用)

2017-02-01 14:06 423 查看

Condition Statement

bogon:~ andyma$ ssh root@121.42.178.112         @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:ROc7Y28voTE0Gd9Zzun+UjNt++xp4zg/4qjkVwitIxc.
Please contact your system administrator.
Add correct host key in /Users/andyma/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/andyma/.ssh/known_hosts:4
RSA host key for 121.42.178.112 has changed and you have requested strict checking.
Host key verification failed.


Reason

这是Linux重装或者openssh-server重装引起的。


Solution

ssh-keygen -R IP

从 known_hosts 文件中删除所有属于 hostname 的密钥。
这个选项主要用于删除经过散列的主机(参见 -H 选项)的密钥。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: