software development, devops, and stuff
Tree lined path

How to Install Telnet on Mac (Including M1, M2 models)

Page Nav

Have you found at the most inopportune time that Telnet is no longer on MacOS? Well, take solace in the fact that you’re not alone. Telnet has been removed from modern versions of the system software starting from MacOS Mojave and newer. These instructions will work for MacOS Mojave and newer, including Monterey (These are the steps that I have personally used to get Telnet back).

Installing Telnet on MacOS with Homebrew

The first way (which is the easiest) is to use Homebrew to install telnet.

Step 1: Install Homebrew (if not already installed)

If you don’t already have Homebrew on your machine, either follow step 1 below or navigate over to the website and follow their installation instructions. Once installed move on to step 2.

$ curl -O https://raw.githubusercontent.com/Homebrew/install/master/install.sh

Open and inspect the install.sh script to see and make sure what it does. And then run it.

$ ./install.sh

Step 2: Install Telnet

After installing Homebrew, install Telnet

$ brew install telnet

That’s it, get back to whatever you needed telnet for.

Installing Telnet on MacOS by Building Telnet from Source

This was the method I used. There are some prerequisite steps though, if you don’t already have them you’ll need to install the MacOS command line tools (step 1 below).

Step 1: Installing the command line tools

Open a terminal and enter the following line, you’ll then be shown a pop up prompt.

$ xcode-select --install

Click install when the prompt pops up.

command line tools install prompt
command line tools install prompt

After that you’ll be shown a license which you’ll have to agree to in order to install.

command line tools license agreement
command line tools license agreement

After that you’ll see the download progress and the install will happen after that. Unfortunately I forget to get screen shots of the following message boxes.

command line tools download progress
command line tools download progress

Step 2: Getting the Telnet source

For this step you’ll be getting the GNU network utilities navigate to the download page and find the latest source. At the time I’m writing this it’s 2.3:

$ curl -O https://ftp.gnu.org/gnu/inetutils/inetutils-2.3.tar.xz

Next grab the signature file and keyring file to verify:

$ curl -O https://ftp.gnu.org/gnu/inetutils/inetutils-2.3.tar.xz.sig
$ curl -O https://ftp.gnu.org/gnu/gnu-keyring.gpg

Finally verify:

$ gpg --verify --keyring ./gnu-keyring.gpg inetutils-2.3.tar.xz.sig inetutils-2.3.tar.xz

This should produce some output that says “ Good signature from…” within it. If that’s not the case, your download isn’t good and I would not proceed any further.

Step 3: Extract the source

$ tar -xvf inetutils-2.3.tar.xz

Step 4: Configure and build

Now that the source is extracted change into the directory:

$ cd inetutils-2.3.tar.xz

Run the configure command:

$ ./configure

Run the make command to build:

$ make

Step 5: Install Telnet

And then install:

$ sudo make install

Either way you choose is fairly easy, the build for this is pretty straight forward and was very quick. It only took me 10 minutes to build from source and install.