I can’t get nc to do anything worthwhile. In fact I can’t even get the examples in the manpage to work. From either my C6 servers or my F17
notebooks. For example:
echo -n “GET / HTTP/1.0\r\n\r\n” | nc medon.htt-consult.com 80
Gets no response. And looking into the access.log of medon shows no access by my client.
I have tried the client/server on both -4 and -6 on a port I have enabled on my firewall. The server looks to be listening, but the client seems to never connect. what I typed in eventually gets played to the terminal session and of course bash says no such command.
Say I have port 5902 open (for VNCserver, and VNCserver is not running). So on server foo, in a su session (because of the port range)
nc -4l 5902
seems to be listening.
Then on bar, also in an su session:
nc -4 foo.domain 5902
After some time nc terminates and “hello world” gets sent to the su session and of course is not a valid command…
So what am I missing here?
Doesn’t matter if I use -4, -6, or neither. It does not work.