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

来源:互联网 发布:国产零食 知乎 编辑:程序博客网 时间:2024/05/20 16:13

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 isSHA256: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 选项)的密钥。 
1 0
原创粉丝点击