4 ms·
I've never really understood why it's a thing to use a telnet client for transmitting text on a socket for purposes other than telnet. My understanding is that
by EE84M3i 8mo ago
I've never really understood why it's a thing to use a telnet client for transmitting text on a socket for purposes other than telnet. My understanding is that telnet is a proper protocol with escape sequences/etc, and even that HTTP/SMTP/etc require things like \r\n for line breaks. Are these protocols just... close enough that it's not a problem in practice for text data?
- swinglock 8mo agoBecause it's there.
- deleted 8mo ago[deleted]
- prmoustache 8mo agoIt hasn't for the most part of the last 2 decades.
- 1718627440 8mo agoThe telnet client comes with MS Windows, Linux and macOS. The only platforms were you need to install some extra component are Android and iOS.
- prmoustache 8mo agoMany companies have been preventing its execution or removing the package by default for a number of years. Also most linux containers do not ships with such binaries to save on img size and reduce vuln management overhead.
- 1718627440 8mo ago> to save on img size $ ls --human --size --dereference $(which telnet) 144K /usr/bin/telnet
- prmoustache 8mo agoThe point is not that this particular binary is huge, the point is that we tend to strip images of anything that is not useful for the actual application shipped. So we strip everything. Also: small things adds up. On AI prompt can be handled reasonably by a single machine, millions of concurrent ones involve huge datacenters and whole energy plants being restarted/built. The point of reducing the amount of binaries shipped with the image is also to reduce the amount of CVEs/vulns in your reports that wouldn't be relevant for your app but woulld still be raised by their presence.
- alphager 8mo agoTelnet client is an optional feature in Windows that needs to be enabled/installed.
- einr 8mo agotelnet hasn’t shipped with macOS since 10.12 Sierra, ten years ago. Debian also isn’t shipping telnet in the base install since Debian 11.
- 1718627440 8mo agoThanks, sounds like a recent development. I don't use macOS, but on other peoples macOS computer it was always there, even when they are not developers. But it could very well be that these computers are ten years old. I mean technically MS Windows 10 is ten years old, but the big upgrade wave to 10 only happened like 4 years ago, which is quite recently. Maybe that is similar to macOS users, I don't know that.
- JasonADrury 8mo agoAre you sure? I can't seem to find the Linux implementation anywhere in the repo https://github.com/search?q=repo%3Atorvalds%2Flinux%20telnet&type=code https://github.com/search?q=repo%3Atorvalds%2Flinux%20telnet...
- 1718627440 8mo agoYou are absolutely right: s|Linux|GNU/Linux|
- degamad 8mo agoBecause for a long time, on most computers, the telnet client was the closest thing to an "open a tcp socket to this ip/port and connect the i/o from it to stdin/stdout" application you can get without installing something or coding it up yourself. These days we have netcat/socat and others, but they're not reliably installed, while telnet used to be generally available because telnetting to another machine was more common. These days, the answer would be to use a netcat variant. In the past, telnet was the best we could be confident would be there.
- prmoustache 8mo agoYou don't even need netcat or socat for that, probing /dev/tcp/<host>/<port> from the shell is enough.
- SoftTalker 8mo agoIn corporate environments, netcat was often banned as it was seen as a "hacking" tool. Having it installed would sometimes get the attention of the security folks, depending how tightly they controlled things.
- indymike 8mo agoSame reason that people use vi. It's always there.
- linuxftw 8mo agoIn the days of yore, Windows had telnet installed. Most hackers used telnet in the 90's and early 2000's.
- teddyh 8mo agoThe telnet protocol with escapes, etc. is only used by the telnet client if you’re connecting to the telnet port. If you’re connecting to HTTP, SMTP or something else, the telnet protocol is not enabled.