On Wed, Jul 08, 2026 at 03:15:26PM +0200, Nicolas George wrote: > Chris Green (HE12026-07-08): > > telnet <server> <port number> > > Better use netcat / nc for that: telnet has an escaping character and > does tty control, that could interfere with your interaction with the > server. > > And if you can change the syntax a little: > > socat - tcp:server:port > > is extremely more powerful.
Yesbut.
If you want to have the equivalent to telnet, you have to tell socat
to convert newlines to CR + LF, like so:
tomas@caliban:~$ socat - TCP4:www.tuxteam.de:80,crnl
GET / HTTP/1.0
HTTP/1.0 403 Forbidden
Content-Type: text/html
Content-Length: 341
Connection: close
Date: Wed, 08 Jul 2026 20:38:26 GMT
Server: lighttpd/1.4.59
...
(Note the ",crnl" option)
(Otherwise I get a "400 Bad Request" in my case: the web server wants
CR + LF terminated lines, as it should the "403 Forbidden" is the right
response)
So still telnet is slightly more convenient. No question that socat
is more powerful, in this case it also can do TLS and things).
Cheers
--
t
signature.asc
Description: PGP signature

