where did telnet go? (10.13 preview)

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.

Replies

Hey ppl so after seeing all your replies I just wanted to point the most simple solutions.


nc -vz ip port as so many people refered; or


curl -v telnet://ip:port


as simple as it gets.


Cheers,

Ricardo

curl -v telnet://ip:port


the same for ftp protocol


I get utterly surprised with the ammount of garbage u people like to put on your macs. I wonder if anybody is going back at FreeBSD kernel v. 1

looks like the people removing netowrk manager from RHEL to install iptables. I mean, people, move on!


No harm inteded with this reply. Cheers.

Ricardo

theThor,


THANK YOU for that! I also have been a network engineer for 25 years and have been using OSX for at least the last 12 of those years and have become quite dependent on terminal as my primary gateway for all things analysis and troubleshooting. Tonight, I need to telnet into a cisco switch that does not offer SSH because it's too old. Serial is an option, but a pain in the rear... Apple dropping telnet from terminal is 1) Rediculous 2) Unnecessary and 3) Deliberately cruel??? I know Apple loves to drive change through corporate communist policies, but youd think they could back off on a couple hundred k of drive space for those of us who not only use their product, but are also walking advertisements for their product everywhere we go...


So much for brand loyalty I suppose ...


Have a great holiday season my friend!


Mike

If you need tab completion and the ? to work, like in network devices, I found this elsewhere on the net (with a tweak):


stty -echo -icanon && nc x.x.x.x 23 ; stty sane


Make that into a script and take $1 as an argument for the IP and you have a pretty good approximation of a telnet client.

It is a common bit of naivete to think that ssh is more secure than telnet. Sure, telnet is usually used insecurely, but it doesn't have to be. My site supported telnet logins for many years with a higher security than ssh. Here's the explanation ...


Telnet doesn't have to be clear-text, it can be encrypted. And it doesn't have to send passwords, it can use nondisclosing authentication. So a telnet daemon configured for, say, Kerberos v5 authentication and mandatory session encryption was *more* secure than ssh, because ssh was still having one security bug after another for a long time. Telnet was far simpler code, and more mature. It had only one security bug that I recall, if certain extensions were added, and it required users to authenticate.

How do you copy it into the usr/bin folder on High Sierra? I copied it out of my other Mac that was still using Sierra, but it won't copy into the High Sierra usr/bin folder. I need it for Terminal, so if I put it somewhere else, would need to know how to Terminal where it is.


Thanks for any help.

So, yea. I use telnet as well!! Are they going to remove ping, in favor of some gui!?!? Come on Apple!


On a side note; netcat is BRILLIANT! Thank you boss for that guidance!

Same issue.


Telnet command works fine from the command line but I'm unable to launch it from a "telnet://1.1.1.1" URL within a browser.


Tested with Safari and Firefox.


Anyone successfully changed the PATH used by the terminal launched from a browser ?


.bashrc and .bash_profile don't seem to be effective :

  • they change the PATH from a "standard" terminal session
  • the PATH of a terminal session launched by the browser is unmodified : PATH=/usr/bin:/bin:/usr/sbin:/sbin

I did the "brew install inetutils" myself.


But libcurl is also built into macOS, and I believe you can do "curl telnet://"

kudos

youre absolutely right.

If you install telnet from previous version (time machine) or via brew. You will need it to be in the /usr/bin directory. Using the /opt/local/bin directory will work if you only use command line telnet via $PATH but will break any telnet URLs.


For example open terminal and typing telnet 1.1.1.1 will work.


Clicking on a link pointing to telnet://1.1.1.1 will not work UNLESS the telnet utility is in the /usr/bin directory.


HOWEVER... you cannot modify the /usr/bin directory until you have SIP disabled on your system.

Thanks a lot. It works for me. 🙂

...or if you have homebrew installed, you can just

brew install telnet

To solve this kind of problems, like slightly different behavior of Linux-like tools or command line stuff that goes missing, I use a Docker container:


FROM ubuntu:latest

RUN apt-get update
RUN apt-get install -y telnet net-tools

Save this in a file named Dockerfile, then enter


docker build . -t tools


and finally


docker run -it tools /usr/bin/telnet


you could create an alias to get telnet back the way it was before. I've added this line to ~/.zshrc:


alias telnet="docker run -it tools /usr/bin/telnet"
Post not yet marked as solved Up vote reply of janv Down vote reply of janv

Apple's Telnet and FTP are back in this homebrew pull request. That includes both the server and client of each one.