我无法ssh和rysnc到远程系统.它不断给出此错误消息:
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
a3:8f:7c:07:c9:12:d8:aa:cd:c2:ba:b3:27:68:bc:c2.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:8
RSA host key for xxx.xxx.xxx.xxx has changed and you have requested strict checking.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(601) [sender=3.0.8]
Run Code Online (Sandbox Code Playgroud)
我删除了authorized_keys文件/home/user/.ssh.
Tal*_*Kit 124
使用以下命令从.ssh/known_hosts文件中删除旧密钥
ssh-keygen -R <host>
Run Code Online (Sandbox Code Playgroud)
Nik*_*RIP 69
消息说" /root/.ssh/known_hosts"not authorized_keys.从中删除该文件(或至少相应的密钥),您可以再次访问!但要注意:密钥必须有变化的原因.系统是否重新安装?确保你检查或ssh的整个想法是无效的.
顺便说一句:你是否有理由以ssh身份出席?
Alf*_*heo 20
该消息确实解释了自己:
如果您信任远程主机,则可以从/root/.ssh/known_hosts中删除第8行,ssh会询问您下次尝试连接时是否可以添加新密钥
如果您不信任远程主机,则必须联系主机管理员以了解他们是否以及为何更改了ssh密钥.如果没有,则意味着您的流量被截获
另一方面,如果您真的非常信任远程主机(例如,它位于Intranet上),则可以运行ssh
-oBatchMode=yes -oStrictHostKeyChecking=no
Run Code Online (Sandbox Code Playgroud)
Pie*_*erz 12
您可以使用sed 8从known_hosts文件中删除违规密钥:
sed -i -e 8d /root/.ssh/known_hosts
Run Code Online (Sandbox Code Playgroud)
小智 5
这样做:
mv .ssh/known_hosts .ssh/known_hosts_old
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
70949 次 |
| 最近记录: |