Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1455067
  • 博文数量: 263
  • 博客积分: 10851
  • 博客等级: 上将
  • 技术积分: 2627
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-26 22:40
文章分类

全部博文(263)

文章存档

2013年(4)

2012年(25)

2011年(33)

2010年(50)

2009年(138)

2008年(13)

分类: LINUX

2011-01-04 16:32:16

 
这个是在命令行输入scp, 手工输入密码的抓包.
 
这个是在expect脚本中调用scp, 自动输入密码同步文件的抓包
 
想问的是:
1. 第二个抓包的截图中, 客户端已经发了fin过去了, 为什么服务器没有像第一个抓包截图那样通过四次握手, 正常的截图本次tcp通信?  
2. 用expect脚本调用scp, 文件同步完成之后会在命令行上打印“Received signal 1. (no core)”,  为什么会有这个?   google上查了很久, 迟迟不能得到答案
 
 
 
 
在网上找到一个这样的回答, 不知道是不是跟这里有关系:
Resolution
As long as the scp command does not require any interactive input (e.g. it doesn't ask for password authentication), you should be able to use pmrun with the -d option to avoid getting the message.  E.g.
pmrun -d scp > :
or
pmrun -d scp >
 
Alternatively, you could simply ignore the message as it has no bearing on the status of the file transfer.
 
Here is an explanation of what appears to be happening:
* F-secure scp forks a child ssh process to launch the sftp-server on the remote system
* The scp and remote sftp-server processes communicate with eachother to transfer the file(s)
* Once the file(s) is(are) transfered, both scp and the remote sftp-server exit
The problem is that the scp is exiting before its child ssh process, presumably because it takes a little bit for ssh to close the connection. The "Received signal 1. (no core)" message actually comes from ssh because it's received a HUP signal from pmlocald once scp finishes.  The -d flag to pmrun will allow the ssh to complete in the background (in nohup mode).
来自:
阅读(2655) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-01-05 11:04:52

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com