Although the initial socketpipe communication setup is performed through client-server intermediaries such as ssh(1) or rsh(1), the communication channel that socketpipe establishes is a direct socket connection between the local and the remote commands. Without the use of socketpipe, when piping remote data through ssh(1) or rsh(1), each data block is read at the local end by the respective client, is sent to the remote daemon and written out again to the remote process. The use of socketpipe removes the inefficiency of the multiple data copies and context switches and can in some cases provide dramatic throughput improvements. On the other hand, the confidentiality and integrity of the data passing through socketpipe's data channel is not protected; socketpipe should therefore be used only within a confined LAN environment. (The authentication process uses the protocol of the underlying login program and is no more or less vulnerable than using the program in isolation; ssh(1) remains secure, rsh(1) continues to be insecure.)
socketpipe -i { tar cf - / } -l { ssh remotehost } -r { dd of=/dev/st0 bs=32k }Backup the local host on a tape drive located on remotehost.
socketpipe -l { ssh remotehost } -r { dd if=/dev/st0 bs=32k } -o { tar xpf - /home/luser }Restore a directory using the tape drive on the remote host.
socketpipe -i { tar cf - / } -l { ssh remotehost } -r { bzip2 -c } -o { dd of=/dev/st0 bs=32k }Backup the local disk on a local tape, compressing the data on the (presumably a lot more powerful) remotehost.
git clone git@github.com:dspinellis/socketpipe.gitDiomidis Spinellis home page
(C) Copyright 2003-2015 D. Spinellis. May be freely uploaded by WWW viewers and similar programs. All other rights reserved.