ssh-xfer simplifies file transfers by utilizing the SSH authentication agent. It enables a secure method of transferring files over SSH.
To utilize this tool, you first need to run a slightly modified SSH authentication agent program on your local computer. You can find patches for both OpenSSH and PuTTY below, and if you've never used an SSH agent program before, this article will provide you with a reasonable guide or the OpenSSH/PuTTY documentation.
You don't need to make any modifications to your ssh client or server programs; all you require are the modified SSH authentication agent and the ssh-xfer program. Once you have the modified ssh-agent program running, you can use ssh-xfer. On the remote host that holds the files you want to grab, you need a compiled version of the ssh-xfer binary. You can create this by applying the OpenSSH patch below to an OpenSSH 3.8.1p1 directory, configure it, and then make ssh-xfer.
To test it out, SSH to the remote host, putting agent forwarding on. Then try: ssh-xfer somefilehere.txt; the file will magically appear on your local ~/Desktop, or on your Windows desktop with the PuTTY patch. If you want a different path, edit the patch. You can also go cat somefilehere.txt | ssh-xfer nametocallfile.txt - to transfer stdin.
The program employs a series of steps for file transfers. In step one, the filename is sent in a packet, and the program waits for a response. In step two, a chunk of data is sent repeatedly without waiting for responses since SSH has windowing, etc., in the channel layer anyway. 500kB/sec over wireless is possible, so the transfers are usually swift. In step three, the program sends a finish packet and waits for a response. If you need additional information about the workings of the ssh-xfer, look at ssh-xfer.c, or ssh-agent.c, from the OpenSSH patch.
Do you have any criticisms, flames, comments, or patches to patches? Don't hesitate to email me. And if you want to see the patch go upstream... well.
Version 0.15: N/A