16Jan/100
Send Data Over a Network Using netcat
Often you cannot direct copy files between machines. One way to pass data is using netcat. There are versions of netcat for both Windows and Linux. Here are the steps to setup a connection to transfer data over a network using netcat.
Setup netcat to listen (the machine receiving the data)
- Command: nc -v -l -p 10000 > command.txt
- Notes: -p is the port that you are opening up to receive the data. You can name the text file anything you want (usually wise to name it something descriptive).
Run a command on the sending machine
- Command: command | nc receiving_machine_ip_address 10000
- When the transfer is complete, kill the command using Ctrl-c