Netcat, often shortened to nc is a utility for reading from and writing to network connections using TCP or UDP. Its often viewed as the swiss army knife of network utilities and can be driven directly or used in scripts.
To send a file using netcat, on the receiving server:
>nc -l -p 1234 -q 1 > something.txt < /dev/null
On the server sending the file
>cat something.txt | netcat server.ip.here 1234
A good netcat reference can be found here: https://www.varonis.com/blog/netcat-commands/