博客专栏

EEPW首页 > 博客 > scp拷贝失败:Host key verification failed 的处理方法

scp拷贝失败:Host key verification failed 的处理方法

发布人:电子禅石 时间:2020-05-21 来源:工程师 发布文章


问题描述:

tc125-dtm{ha2}[35]: scp aa 210.10.3.86:/tmp
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
bf:8b:cc:58:71:b0:b4:b1:7b:db:30:92:8f:e7:14:25.
Please contact your system administrator.
Add correct host key in /home/h-a2/vl/home/.ssh/known_hosts to get rid of this message.
Offending key in /home/h-a2/vl/home/.ssh/known_hosts:1
RSA host key for 210.10.3.86 has changed and you have requested strict checking.
Host key verification failed.
lost connection

由于公钥不一样了,所以无法登录,提示信息是 KEY 验证失败。

########################################################################

 

解决方法:

1. .ssh/known_hosts 裡面记录的目标主机 key 值不正确。这是最普遍的情况,只要删除对应的主机记录就能恢复正常。

运行命令: sudo rm /home/yourname/.ssh/known_hosts 

2. .ssh 目录或者 .ssh/known_hosts 对当前用户的权限设置不正确。这种情况比较少,一般正确设置读写权限以后也能恢复正常。

3. /dev/tty 对 other 用户没有放开读写权限。这种情况极为罕见。出现的现象是,只有 root 用户能够使用 ssh client,而所有其他的普通用户都会出现错误。

1.png

*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。

linux操作系统文章专题:linux操作系统详解(linux不再难懂)


关键词:

相关推荐

技术专区

关闭