Is it just me or is the telnet client no longer present in macOS High Sierra? There doesn't appear to be an open source drop in replacement that works out of the box, and telnet + libtelnet combination from opensource.apple.com doesn't appear to work out of the box either. I think the telnet package that gentoo uses could be patched to work, but wanted to see if anyone wanted to weigh in here first before I spend too much time on that.
where did telnet go? (10.13 preview)
Thanks John, this worked exactly as described!
Removing these programs from the standard install has no justification whatsoever. They will eventually have to be used and forcing users to download and install someone else's coreutils is just outrageous.
EDIT:
Also I just tried using the GNU inetutils and they are buggy on OS X. Which is no surprise, they aren't meant for this system which makes removing the BSD ones even more ludicrous.
I sure hope this change is temporary and that these standard utilities will be back once 10.13 is out of beta. It would be utter folly to remove these utilities, regardless of their "insecurity." To be honest, whoever uses these protocols without the knowledge that they are insecure has no business using networking utilities at all. I mean, for goodness sake, I thought it was well known that not every host has the luxury of running `sshd'.
TLDR:
These programs are absolutely necessary. Removing them is tantamount to removing all doors without locks because locked doors are "better."
Upgraded to High Sierra today and already miss telnet. 🙂
My needs for telnet went a little beyond basic connectivity tests. I needed to send a command. Fortunately, nc (netcat) can do a simple command as well. I was able to replace this:
echo "some command" | telnet example.com 12345
with this:
echo "some command" | nc -c example.com 12345
Brew is your friend, now pour yourself a pint of telnet using "brew install telnet" or install brew first.
Drink up!
OK, I got Brew and downloaded Telnet. As a client, it works fine.
Now, how do I enable telent server under High Sierra? The following old instructions no longer work.
anand$ sudo launchctl
Password:
launchd% load -F /System/Library/LaunchDaemons/telnet.plist
launchd% exit
I freaked out about this too but then a coworker told me I can test for listening ports with netcat (nc).
It's much cleaner, you can exit it with ctrl+c instead of having to change to a keyboard layout that has [ on its own key without modifiers just to be able to do the escape sequence.
You are absolutely correct, sir. Removing telnet and ftp bash clients from High Sierra was a mistake, not withstanding the ramblings of others. The same is true for Microsoft's move to require telnet and ftp clients to be installed as a "feature" when they attempted to mitigate security issues by doing so. In a large degree, they still don't seem to understand security. Oddly enough, tftp still works on HS. Go figure.
One can copy telnet and ftp over from a Sierra /usr/bin to High Sierra /usr/local/bin and it works fine. Be sure to chmod +xr both after the copy (using sudo). Much easier than downloading other versions, etc.
t
In that case you're better off just using ssh as it is more secured ...
I have legacy hardware that doesn't support SSH. I need Telnet.
Somewhere in this thread it was suggested to get back the telnet client, just run "brew install telnet" or install "brew" if not present.
netcat is a far more appropriate and capable tool than telnet for connecting to random ports for testing, and it's still included in the base macos install.
(e.g. $ nc -v x.x.x.x portno)
The lack of command line ftp is frustrating though.
LOL! I alrready did that, and mentioned it in my first post.
I have the client.....I want to know how to turn to Telnet Server on.
You can create a simple script to replace telnet with installed nc command:
sudo echo '#!/bin/bash' > /usr/local/bin/telnet
sudo echo 'nc -c $@' >> /usr/local/bin/telnet
sudo chmod 755 /usr/local/bin/telnet
As napabar explained, only the telnet client is available in homebrew. No server. Plus, what about ftp, rsh, rcp, etc.? Don't just say to use the the GNU inetutils, as they can be buggy on OS X. No surprise; they are hardly ever used on this system. Now people basically have no alternative. Not to mention that the last stable release of it was in 2015.
Frankly, Apple has no excuse for removing these tools. Pushing ssh is pointless; the reason that people don't use ssh is NOT because there are alternatives available. The reasons that people don't use ssh are typically one of:
- they have no choice, or
- encryption is NOT needed or wanted in their use case
Trying to force ssh down people's throats is not going to work. There are simply places where ssh can't go, shouldn't go, or isn't allowed to go.
Yeah, despite popular belief, locking everything up is not always needed. Again, it's a real shame that Apple always pushes stupid agendas like this for no real reason. It's just pointless and painful. But when has Apple cared about forcing people to go through pointless and painful changes, after all?
Maybe all this sounds hard on Apple. But take a step back and ask yourself: does it hurt a multi-billion dollar company to just let their developers and power-users have what they want / need? Of course not. They just either get a rush out of controlling their customers and / or they convince themselves of stupid reasons as to why that's a good thing.
By the way, I'm not angry at you, iTen. I'm just saying the homebrew is unfortunately not sufficient for this issue. And I'm angry that Apple forces people to jump through these pointless hoops just to get some needed functionality.