File transfer between two computers over the Internet (netcat)
A simple and very necessary utility that can transfer data over the network. netcat (or nc) must be in any distribution. If it doesn’t exist, then, using the example of Debian, it is put like this: apt-get install netcat
The idea of netcat is very simple: it simply redirects the data stream to the network device port, and at the other end the stream is redirected to a file.
use it like this:
server side nc -l -p 3333 > file.txt
client side: cat file.txt | nc -q 0 <remote_ip> 3333 The -q 0 key is needed in order for netcat to shut down immediately after sending ')
You can send files after packing them: server side nc -l -p 3333 | tar xv