我无法通过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]
我已经从/home/user/.ssh
中删除了authorized_keys
文件。
发布于 2011-12-28 17:34:32
消息上写的是"/root/.ssh/known_hosts
“而不是authorized_keys。从该文件中删除该文件(或至少相应的密钥),然后可以再次执行操作!但请注意:密钥更改肯定是有原因的。系统是否重新安装?请确保检查这一点,否则ssh的整个概念都是无效的。
顺便说一句,你以root身份ssh有什么原因吗?
发布于 2012-11-27 18:46:38
使用以下命令从.ssh/known_hosts文件中删除旧密钥
ssh-keygen -R <host>
发布于 2015-02-11 18:31:16
您可以使用sed从known_hosts文件中删除8
行的有问题的键:
sed -i -e 8d /root/.ssh/known_hosts
https://stackoverflow.com/questions/8654064
复制相似问题