Chinaunix首页 | 论坛 | 博客
  • 博客访问: 959538
  • 博文数量: 245
  • 博客积分: 11429
  • 博客等级: 上将
  • 技术积分: 2662
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-15 00:16
文章存档

2011年(56)

2010年(174)

2009年(15)

分类: LINUX

2010-08-26 15:27:40

当用scp两个服务器相互传输文件时报如下错误

scp -P 22 web13701.tar.gz 192.168.188.11:/mnt/
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
ae:ae:bf:a6:73:ee:f3:96:2a:29:e4:4d:83:1e:f8:0e.
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:2
RSA host key for 192.168.188.11 has changed and you have requested strict checking.
Host key verification failed.
lost connection

分析:
是因为这个服务器之前曾登录过,在/root/.ssh/known_hosts 里边存有一份连接key
如果此时 这个服务器上的密钥更改后,或是重做系统,此时的密钥改变,因此会报告以上连接密钥错误

解决方法:
编辑/root/.ssh/known_hosts 删除连接出错的文件
  然后在重新连接
scp -P 22 web13701.tar.gz 192.168.188.11:/mnt/
The authenticity of host '192.168.188.11 (192.168.188.11)' can't be established.
RSA key fingerprint is ae:ae:bf:a6:73:ee:f3:96:2a:29:e4:4d:83:1e:f8:0e.
Are you sure you want to continue connecting (yes/no)? yes  出现选项了哦
Warning: Permanently added '192.168.188.11' (RSA) to the list of known hosts.
Address 192.168.188.11 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
root@192.168.188.11's password: 输入密码

此时 正确了
阅读(1490) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~