Wednesday, May 13, 2009

Copy Files with netcat

You can use netcat and tar to transfer large files/folders over the internet/network. If you are going to transfer sensitive files over the internet consider using this in conjunction with ssh.

On the destination
nc -l -p 7000 localhost | tar -xvf -


On the source
tar cf - directory_to_copy | nc destination_host 7000

No comments:

Post a Comment