4 ms·
After finding that using scp to copy stuff over my local network (and before finding out about hpn-ssh) I wrote this icky script to get better performance copyi
by arbalist 12y ago
After finding that using scp to copy stuff over my local network (and before finding out about hpn-ssh) I wrote this icky script to get better performance copying moving stuff around: https://github.com/toofar/fcp https://github.com/toofar/fcp
It just wraps ssh+netcat+tar. The ssh connection is just used to setup the netcat (actually nc) connection like in mosh.
It doesn't have much dependencies (although it can use pv if installed on the local machine) and so should work on most platforms (didn't work on android last I checked, but I think I know why). It's a pretty ugly script (in particular errors are not propagated back to the terminal and backgrounding pv can lead to offset output) but it works and can even use scp's bash_completion script for completion on a remote filesystem.
- reacweb 12y agono need of netcat: tar c . | ssh user@host tar x -C destdir
- arbalist 12y agoThe need to use netcat is that it is faster. It gets better throughput in the presence of plentiful bandwidth. The whole point was to avoid using ssh for bulk transport.
- reacweb 12y agossh user@host "nc -l 1234 | tar x -C dest_dir" and in another terminal: tar c . | nc -p host 1234 If you do not care about security, why not using rcp ?