~/Netcat File Transfer Basics
Oct 14, 2020
Netcat also known as nc is a simple tool for reading or writing data across network connections using TCP or UDP. It is popular for its use in quick file transfers between systems.
Transfer a file from one machine to another:
On the receiver, run:
|
|
On the sender, run:
|
|
Replace 1234 with your chosen port and destination_ip with the receivers IP address.
Netcat does not have authentication or encryption. Use tools like openssl or scp if you need security.
For UDP transmission, add the -u flag to both commands.
Common issues:
- Make sure firewall allows chosen port.
- Netcat versions differ. Try
nc.traditionalorncatif you see errors.
Netcat is preinstalled on many Linux systems and available on most platforms. Always verify files after transfer to ensure data integrity.