How to Get Telnet for MacOS in Ventura, Monterey, Big Sur, Catalina, Mojave or High Sierra
Need to use Telnet in MacOS? Well, many Mac users have discovered that Telnet has been removed from modern versions of system software, including macOS Ventura, MacOS Monterey, macOS Big Sur, Catalina, Mojave and macOS High Sierra. Presumably this is to encourage using the ssh client instead, but there are many Mac users who need Telnet for a variety of reasons. Telnet continues to be in a valid tool for many systems and network administrators, security professionals, people working with Cisco hardware or towards Cisco certification, MUD enthusiasts, amongst many other purposes.
Accordingly, this tutorial will detail several different ways to get Telnet back in modern versions of Mac OS system software. We’ll cover installing Telnet with Homebrew, restoring Telnet from a prior system software release or backup, compiling Telnet from source, as well as a few alternatives to telnet.
This article will assume that you have experience working with the Terminal and command line, since Telnet is entirely command line based.
Installing Telnet in MacOS with Homebrew
By far the simplest option is for Mac users to install Telnet through Homebrew. Of course this means you will need to install Homebrew on the Mac first, but if you’re advanced user that spends time in the command line you’ll likely appreciate having Homebrew for other reasons since you
- Install Homebrew on Mac OS if you haven’t done so already – if you already have Homebrew skip this step
- Use Homebrew to install telnet with the following command:
- Hit Return and let Homebrew download and install Telnet to the Mac
- When installation has complete, you can run Telnet as usual:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install telnet
One simple way to test that Telnet is working properly after installation is to connect to the goofy Star Wars telnet server, which plays Star Wars in ASCII art:
You’ll know Telnet is working when you are greeted by Star Wars rendered in ASCII characters (and yes seriously, it’s the full movie).
Installing Telnet in MacOS Mojave & High Sierra via Older MacOS Versions or Backups
If you happen to have access to a Mac that is running a prior version of MacOS (Sierra or prior), or you happen to have an older MacOS system software backup laying around from Time Machine or otherwise, you can actually just copy the old binaries from that computer or backup to your modern MacOS installation, and telnet will work just fine.
With Mac OS and Mac OS X versions that include telnet, you will find Telnet at the following location (thus serving as a reference for where to find the binary in the backups:
The telnet binary is tiny weighing in at only 114 kb, so this is a quick simple task.
Copying that telnet binary into the following location in modern macOS releases, including MacOS Mojave 10.14 and MacOS High Sierra 10.13.x, will allow telnet to run on the new system software releases:
At that point you can run the ‘telnet’ command as usual.
Another option which requires more caution is to request the telnet binary from a trusted coworker or trusted friend who is running MacOS Sierra or prior. All they need to do is zip up and send you their /usr/bin/telnet binary file. Do not try and find a random telnet binary zip file from the internet since it could be compromised or otherwise untrustworthy. It’d be a good idea to use md5 hash or sha1 checksum on the original telnet binary if you’re going this route.
By the way, if you’re relying on binaries of telnet from Sierra or earlier, you might also be interested in grabbing ftp as well, which is also removed from modern macOS releases, but is located at the following location in prior MacOS builds:
Again you’d place the ftp binary into /usr/local/bin/ on new versions of system software.
For those wondering, while Telnet (and ftp) has been removed from Mojave, High Sierra, and presumably anything moving forward, MacOS Sierra remains the last version of system software to include Telnet by default, while any MacOS / Mac OS X release prior to Sierra also includes Telnet and ftp, including El Capitan, Snow Leopard, Yosemite, Mountain Lion, Mavericks, Tiger, Cheetah, etc.
Telnet Alternatives for Mac: SSH, Netcat
Of course there are some alternatives for Telnet, depending on what you need to use telnet for in the first place.
For remote connections, ssh is the new standard as it is secured, and both the ssh server and ssh client are available by default in all modern versions of MacOS system software. Simply, connecting to a remote IP with ssh would look as follows:
For simple testing of network connectivity, or for testing of an open / listening port, netcat can often fulfill the same needs that telnet provides. For example, you can confirm that the connection to the aforementioned ASCII Star Wars server and port 80 works with the following netcat command string:
nc -vz towel.blinkenlights.nl 80
Remember that netcat for this purpose requires specifying a valid TCP or UDP port number of whatever the host protocol is.
Restoring Telnet to MacOS Mojave & High Sierra by Compiling Telnet from Source
If you don’t want to use Homebrew for whatever reason, you can also compile Telnet yourself from inetutils source. As a prerequisite you’ll still need to install the Mac OS command line tools to be able to accomplish this, however.
First you’d download the latest inetutils package from gnu.org:
curl -o http://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.gz
Next you’d decompress the tarsal:
tar xvzf inetutils-1.9.4.tar.gz
Now change into the appropriate directory:
Issue the configure command to begin:
When configure is complete, make from source:
And finally, use make install to complete the installation of inetutils and telnet:
sudo make install
Personally I think using Homebrew is easier, plus there are many other great and useful Homebrew packages available. If you’re familiar with compiling from source and you are this far, you’ll almost certainly appreciate having Homebrew anyway.
What about Telnet for iPad and iPhone? Telnet for iOS!
Just to cover all bases, there are also telnet clients available for iOS. How practical this is for you likely depends on your particular device and what your intention with telnet is, but a free option for iOS is iTerminal and an excellent paid option is Prompt. Using ssh and telnet from an iOS device can be a challenge without an external keyboard though, so you might want to connect one to your iPhone or iPad before going that route, and realistically this is a better option for the iPad simply due to the larger screen. Of course iOS is not MacOS however, so this is sort of off topic.
Alright so that’s a pretty comprehensive guide to getting Telnet in modern MacOS releases, but if you know of another method, or another approach to getting Telnet in MacOS High Sierra or returning Telnet to MacOS Mojave, share with us in the comments below!
Homebrew warns of a new URL to use:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
awesome. thanks was able to eke out from time machine backup via terminal unless someone knows how to see unix folders from time machine gui itself, it worked for me
The MacPorts project, https://www.macports.org/, brings you all the common network programs in a single bundle called inetutils. Simply runing
`port install inetutils`
will leave you with a “gtelnet” in “/opt/local/bin/”.
Hi guys, thanks a lot for this. But there is a mistake in the curl command, please correct it. The o has to be O (capital).
curl -O http://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.gz
curl -o http://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.gz
Thank you so much! It worked !)))
Can’t tell you – how much thankful, I am for this to you..
Was struggling to get an router running on MAC.
So so so much thanks for this.
Getting Connection closed by foreign host. when trying star wars ascii
compliling worked fine curl command needs edit
sudo curl -o inetutils-1.9.4.tar.gz http://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.gz
I just ran into this issue as well – a simple work around was to take my telnet file, change permissions on it so my user account can read/write (default is read only), place it in the Application folder; double click on telnet and the warning comes up about untrusted developers etc… In Sys Prefs, look in security and click on Open Anyway. From this point on it opens like an app and allows telnet to run normally.
Or take simply in Mojave the telnet program from yosemite. For me its working.
Install brew and after that wget and telnet, working wonderful! Thank you for your time and share the procedure!!
You can also pull telnet and ftp from an old Time Machine backup if you still have one going back to Sierra. And don’t forget to copy the man pages, too.
Sounded good but did not work for me and there are no uninstall instructions. All it let me do was the Star Wars thing. I tried to telnet from Safari and that did not work. My mistake following the instructions. It is hard to unring the bell. I hope the bell does not cause me issues.
Telnet requires a remote telnet server to connect to, it’s just a different protocol (like ssh, ftp, http, etc) for connecting to a remote server. The Star Wars server is just an example of a telnet server that anyone can connect to without a login or authentication. It’s somewhat outdated and not secure which is probably why Apple removed it in new releases of their system software, but many advanced users still need it for a variety of reasons.
As for removal; typically if you need telnet you wouldn’t want to uninstall it, but you make a good point! You can uninstall Telnet from Homebrew:
brew uninstall telnet
On a broader level though, most users have no reason to install Telnet. If you don’t specifically need Telnet, you should not install it. Same as any other software, if it’s not relevant to you or necessary for your work then there is no benefit to installing it, as ultimately it will just add more stuff to your system that is unused, creating app clutter along the way. Homebrew is the same too, if you don’t spend a lot of time at the command line it’s probably not worth installing. Personally I don’t install most things for exactly this reason, I try and keep my personal third party application list fairly slim. Less apps installed means less apps to maintain and worry about, fewer updates, fewer things needed to reproduce a working environment if you need to, etc.
A simple Google search for uninstalling Home Brew will give you this site:
Uninstalling is simple.
Another reason why i “down” graded to Mac OS Sierra, was when I found out that VNC SSH tunnels do not work in High Sierra. I need this for my job a lot. Mac OS constantly being dumbed down into a home user pile of junk
You can also load the right libs in PERL, JAVA, or other languages to to use telnet, ftp and other inetutils w/o an install of the binaries.
So this was an unwelcome surprise after upgrading to High Sierra, and further proof that Apple assumes most of their users have a snapchat-level of tech expertise and needs.
One thing this write-up doesn’t cover is the need to disable rootless access/system integrity protection and reboot the machine before you will be allowed to copy telnet and ftp off an older OS instance in to to /usr/bin.
You can always use /usr/local/bin which does not require you to disable SIP; that’s what Homebrew does
Don’t like it? Don’t buy Macs. It’s that simple. It’s not necessary to muck around with the system. Apple restricts installing into /usr/bin, but they do not restrict installing into /usr/local/bin. I use a lot of tools, and everything works great installed into /usr/local/bin. The days of unrestricted modifications of macOS are over, and I’m glad. I have been working with what is now called “macOS” since the beta release of Mac OS X in September 2000, and I’m glad that Apple has taken steps to protect the integrity of the operating system. Your name, “WalledGardenofStupidity” shows that you don’t understand anything about what Apple has done to protect the OS from being exploited. Unlike Microsoft, Apple actually takes this seriously. With a Windows PC, you have to install a lot of add-ons to get Apple’s level of security.
1 – you’re confusing /bin and /usr/bin with /usr/bin and /usr/local/bin
2 – Those who give up their liberty for more security neither deserve liberty nor security
3 – Being glad with whatever you get does not solve any problem
Wow this man is triggered by a mere username choice that isn’t even directed to them lmao.
Didn’t know Apple deluded fans would be this snowflake over a mere tutorial article comment
I’d recommend using Homebrew, you don’t need to mess with SIP/rootless and you can get telnet, ftp, telnetd, ftpd, etc all with a single command:
brew install tnftp tnftpd telnet telnetd
Yes, and in addition to ~100KB telnet you will install couple of MB/GB of useless mess from unknown source with root privileges.
Installation of Homebrew is the simplest way how to make macOS insecure and unstable.
I’m really surprised, that such idea can be promoted on a portal like this :(
review the formulae code on GitHub to see what will actually be done.
In the case of telnetd for example – it pulls the tarball from opensource.apple.com, verifies the sha256, shows exactly where things will be put including the man8.
I’m really surprised that an idea like yours wasn’t challenged in nearly 2 years.