这个是在命令行输入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).
来自:
阅读(2693) | 评论(1) | 转发(0) |