SCP报错:Host key verification failed.

简介:
1 scp报错:REMOTE HOST IDENTIFICATION HAS CHANGED!
[root@xx ~]# scp yum-3.4.3.tar.gz 10.xx.xx.12:/root
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
xxxxx.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:20
RSA host key for 10.xx.xx.12 has changed and you have requested strict checking.
Host key verification failed.
lost connection

[root@cache-2 ~]# 

2, google,RSA报错,要不重建RSA Key,要么就删除Client的known_hosts中对应的ip信息记录,这里选择后一种

3, 先找到known_hosts的路径
[root@xx tmp]# find / -name known_hosts
/root/.ssh/known_hosts

4,先备份系统文件,在修改
[root@cache-2 tmp]# cp /root/.ssh/known_hosts /root/.ssh/bak.20140526.known_hosts
[root@cache-2 tmp]#rm -f /root/.ssh/known_hosts

5,再执行scp命令,输入密码,传输成功。
[root@xx ~]# scp yum-3.4.3.tar.gz 10.xx.xx.12:/root
root@10.xx.1x.12's password: 

yum-3.4.3.tar.gz                                                                                                                                             100% 1114KB   1.1MB/s   00:00    


本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1923252

相关文章
|
IDE Shell 网络安全
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
390 0
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
|
5天前
|
存储 网络安全
Curl error (60): SSL peer certificate or SSH remote key was not OK for https://update.cs2c.com.cn/NS/V10/V10SP2/os/adv/lic/base/x86_64/repodata/repomd.xml [SSL: no alternative certificate subject name matches target host name 'update.cs2c.com.cn']
【10月更文挑战第30天】在尝试从麒麟软件仓库(ks10-adv-os)下载元数据时,遇到 SSL 证书验证问题。错误提示为:`Curl error (60): SSL peer certificate or SSH remote key was not OK`。可能原因包括证书不被信任、证书与域名不匹配或网络问题。解决方法包括检查网络连接、导入 SSL 证书、禁用 SSL 证书验证(不推荐)、联系仓库管理员、检查系统时间和尝试其他镜像。
17 1
|
网络安全 开发工具 git
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
3718 0
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
|
2月前
|
网络安全
出现“Host key verification failed”错误--解决
遇到“Host key verification failed”错误,通常是因为远程主机密钥发生变化,与本地保存的信息不符。这种情况可能是远程主机系统更改或重装等原因导致的。解决方法是根据提示使用`ssh-keygen -f "/root/.ssh/known_hosts" -R "[10.61.0.152]:29022"`命令移除旧的密钥信息,然后重新尝试连接。
348 5
|
6月前
|
缓存 数据安全/隐私保护 Windows
ECDSA host key for ... has changed and you have requested strict checking.Host key verification fail
ECDSA host key for ... has changed and you have requested strict checking.Host key verification fail
|
安全 网络安全 开发工具
【已解决】Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
484 0
【已解决】Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh
服务器重启后 Host key verification failed
服务器重启后 Host key verification failed
143 0
服务器重启后 Host key verification failed
|
网络安全
ssh启用报错 unable to load host key /etc/ssh/ssh_host_ed25519_key bad permissions
ssh启用报错 unable to load host key /etc/ssh/ssh_host_ed25519_key bad permissions
443 0
CDH5.8.2安装之Hash verification failed
一.问题 Hash verification failed 在cdh5.8.2 web界面集群安装过程中,Parcels hash校验失败。 二.
3869 0
|
网络安全 开发工具
Unable to negotiate with XX.XX.XX.XX: no matching host key type found. Their offer: ssh-dss
Unable to negotiate with XX.XX.XX.XX: no matching host key type found. Their offer: ssh-dss