7 ms·
Am I the only one who still thinks that telnet is a basic utility that should be installed on every system? It's a lot easier and more explicit to verify that a
by abalashov 1y ago
Am I the only one who still thinks that telnet is a basic utility that should be installed on every system? It's a lot easier and more explicit to verify that a TCP listener is working using telnet than netcat and the like.
I know I'm living in a different and hitherto unimaginable universe when I paste modern cloud-devops sysadmin types the output of a hung telnet connection attempt to port 22, as implicit evidence that it's blocked by a firewall or whatnot, e.g.
$ telnet 172.30.110.9 22
Trying 172.30.110.9...
^C
and they say, "But it's SSH, so you can't use Telnet!"
... bro. I know it's a DeVry Cloud DevOps certificate, but...
- bawolff 1y agoI dont really see how that is any different from netcat with -v option.
- abalashov 1y agoI will grant that it's a matter of taste and the prejudices of being O.G., but the subtle visual difference between: $ nc -v 172.30.110.9 22 [literally nothing] and: $ telnet 172.30.110.9 22 Trying 172.30.110.9... ... has always struck me as significant, and pedagogically relevant.
- indigodaddy 1y agoIt is on every system, kinda (well curl usually is): ~ $ curl -v telnet://1.1.1.1:443 * Trying 1.1.1.1:443... * Connected to 1.1.1.1 (1.1.1.1) port 443 -- ~ $ curl -v telnet://1.1.1.1:22 * Trying 1.1.1.1:22... ^C ~ $
- abalashov 1y agoI didn't know curl could do that. Something new every day... thanks! Having said that, in the world of my customers' systems, neither telnet nor curl can be presumed, it seems.
- indigodaddy 1y agoMe either until a few years ago. My mind was well blown!
- indigodaddy 1y agoIntroduces more ambiguity in terms of replies, but you could also just use curl straight up: ~ $ curl -v 1.1.1.1:53 * Trying 1.1.1.1:53... * Connected to 1.1.1.1 (1.1.1.1) port 53 * using HTTP/1.x > GET / HTTP/1.1 > Host: 1.1.1.1:53 > User-Agent: curl/8.13.0 > Accept: / > * Request completely sent off * Empty reply from server * shutting down connection #0 curl: (52) Empty reply from server -- ~ $ curl -v 1.1.1.1:22 * Trying 1.1.1.1:22... ^C
- em500 1y agoCurl is not installed by default on Debian or Ubuntu. And if you need to apt install you might as well just apt telnet.
- indigodaddy 1y agoYour secops team might disagree
- NoSalt 1y agoDid you seriously just say "hitherto unimaginable"?
- abalashov 1y agoI did. In the century I come from, Telnet would never be confused for SSH.
- indigodaddy 1y agoLol, these sorts of comments spark memories, one being at a telecom where our team basically was the incoming ticket Ops team for just about all other internal teams, we would often get tickets with the heading "Putty is down." Always makes me chuckle whenever I remember that..
- deleted 1y ago[deleted]
- Lammy 1y agohttps://youtu.be/mpNn1nht0_8?t=219 https://youtu.be/mpNn1nht0_8?t=219
- charcircuit 1y agoHow do you even test TCP listeners with telnet? Like how do you do an HTTPS handshake by hand. It doesn't seem practical in the modern world.
- abalashov 1y agoNot intended for such advanced situations, only ones where knowing that you're listening on 443 (or whatever) is enough.
- shanemhansen 1y agoYou don't do a HTTPS handshake by hand. That's what openssl s_client is for. https://docs.openssl.org/1.0.2/man1/s_client/ https://docs.openssl.org/1.0.2/man1/s_client/ Or maybe socat, I don't use it but I'm pretty sure I've seen people use it.
- charcircuit 1y agoYou are proving my point that telnet is not useful in modern times.
- abalashov 1y agoOnly if you're a web economy weenie and think HTTP[S] is the measure of utility of most TCP interactions. ;) I can't remember the last time I used telnet to test whether a web server was live. I don't think web servers figure very prominently in the work I do, though not zero, for sure. However, I doubt I'm the only one in that boat.
- charcircuit 1y agoOkay let's say you want to ping a Minecraft server and see how many users are online. That's not possible either with telnet. The concept of protocols made up of printable characters delimited by new lines is antiquated.
- 1y ago
- m3047 1y agoI don't know. I still use telnet for things, but I can use nc in a pinch. I would be more inclined to wish for expect. What I don't get is all the SSL kids never mention s_client, as in "...use s_client instead". Granted, most of the time ssl will work for, you know SSH (port 22). Are you really going to negotiate the cypher by hand, mate? I get it, how many of them can identify what "\x16\x03\x01" is?