something like telnet, but "listen on", not "connect to"
The usual tool for this is something called netcat
. It's available in most Linux distros, and may even be installed by default in some (the command is nc
). There are even ports for Windows, but nearly every antivirus package on the planet considers it deeply suspicious due it's use in malware which makes it hard to download and use.
1) on host a: telnet listen 12345
$ ls | nc -l -p 12345
Depends on the distro and netcat version, you may not need -p
option.
2) on host b: telnet host_a 12345
$ telnet host_a 12345
1159.rar
12030.mp4
123.mp4
124.mp4
129
129.bak
...
You are looking for a program called netcat. It is the swiss army knife of network utilities. You can tell it to listen on any arbitrary port as well as many other things.
Netcat, is what you're looking for.
http://netcat.sourceforge.net/
Download Netcat. Swiss army knife of network utilities. http://netcat.sourceforge.net/