I have found the perfect solution to write scripts which send files across machines over the Internet using netcat.
On the machine receiving files I do
nc -l -p 1234 -k and then on the machines sending I use scripts which basically use some form of
ncat 220.127.116.11 1234<some_file.
But this is very dangerous because anyone on the Internet can spawn a shell on the listening "server" machine or at least execute commands on it.
I can't use any sort of encryption or key because it would get easily leaked from the machines sending these files.
I am basically looking for a way to make netcat safely open the port and receive anything without risk. If this is not possible or still too dirty or risky to do, then I'm open to suggestions for other methods other than netcat to achieve this. Thanks in advance ;)