Transfer files between computers with netcat
You can use netcat (nc) to copy file from one computer/server to another.
On destination computer
Run netcat in listening mode.
1 |
nc -l -s LISTEN_IP -p LISTEN_PORT > FILE_NAME |
Example
1 |
nc -l -s 51.38.246.115 -p 5555 > azure-nginx.tar |
On Source computer
This is the computer from where you copying file from. To copy a file, run
1 |
cat FILENAME | nc DESTINATION_IP DESTINATION PORT |
Example
1 |
cat nginx.tar | nc 51.38.246.115 5555 |