принимающая: nc -l 1234 | dd of=/tmp/image.img bs=4096 отдающая: dd if=/dev/sda bs=4096 | nc 1.2.3.4 1234
out: nc localhost 12345 < /any/file in: nc -l 12345 > any_file.img
nc -l 1234 | bzip2 -d|dd of=/tmp/image.img bs=4096 dd if=/dev/sda bs=4096| bzip2 -9 | nc 1.2.3.4 1234
Discussion
https://unix.stackexchange.com/questions/10428/simple-way-to-create-a-tunnel-from-one-local-port-to-another
передача файла