To install Telnet on Mac, install Homebrew, open Terminal, and run brew install telnet. You can then connect with telnet HOST PORT, replacing the placeholders with your destination and its service port.
Homebrew’s current supported configuration is an Apple Silicon Mac running macOS Sequoia 15 or newer; Intel configurations are Tier 3. If you already use a compatible MacPorts installation, you can install its GNU Inetutils package and connect with gtelnet instead.
The short version
- Standalone client: Homebrew installs Telnet with
brew install telnet. - Finish setup: Complete Homebrew’s printed shell configuration instructions before installing the client.
- Choose one package: Homebrew’s standalone Telnet and Inetutils packages conflict, so install only one of them.
- MacPorts option: Its default Inetutils client uses the command name
gtelnet. - Leave a session: With Homebrew’s standalone client and its default escape character, press Control + ], enter
quit, and press Return.
| Installation option | Package | Connection command |
|---|---|---|
| Homebrew standalone client | telnet | telnet HOST PORT |
| Homebrew GNU client | inetutils | telnet HOST PORT or gtelnet HOST PORT |
| MacPorts GNU client | inetutils with the default client variant | gtelnet HOST PORT |
Set up Homebrew
Open Terminal from Applications > Utilities > Terminal. If Homebrew is already installed and its shell configuration is complete, continue to the Telnet installation below.
For a new installation, open the official Homebrew page. Run its Terminal installer command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Complete the shell configuration instructions printed by the installer before running package commands. If you skipped those instructions, finish them before trying to install Telnet.
If you prefer a graphical installer, open Homebrew’s installation page and follow its link to the latest Homebrew/brew release. Install the macOS .pkg, then complete the documented shell setup. This package installer supports Apple Silicon only.
Install the standalone Telnet client
With Homebrew ready, you can install its standalone Telnet package in Terminal. Run this command to add the client:
brew install telnetDo not install this package alongside Homebrew’s inetutils package, because the two conflict. If you already have Homebrew Inetutils installed, use its Telnet command instead of adding the standalone package.
The standalone formula lists prebuilt packages for Apple Silicon on Golden Gate, Tahoe, Sequoia, and Sonoma, plus Intel on Sonoma. A listed prebuilt package does not mean your Mac meets Homebrew’s full platform support requirements. Homebrew’s supported configuration remains Apple Silicon with macOS Sequoia 15 or newer.
Choose GNU Telnet through Homebrew
You can also install GNU Telnet as part of Homebrew’s Inetutils package. Choose this instead of the standalone package, since the two conflict:
brew install inetutilsWith this package, you can connect using either telnet or gtelnet. In the command below, replace HOST with your destination and PORT with its service port. Ordinary Telnet is unencrypted.
gtelnet HOST PORTGNU Telnet provides options for selecting the IP family, changing the escape character, and ignoring your startup configuration. The interactive prompt and exit steps below apply specifically to Homebrew’s Apple-derived standalone client.
Install Telnet with MacPorts
If you already have a compatible MacPorts installation, go straight to the Inetutils installation command below. To set up MacPorts first, obtain Apple’s developer tools from Terminal:
xcode-select --installOpen the MacPorts download and installation page and choose the installer matching your Mac’s operating system. Open the downloaded package in macOS Installer and complete the installation. MacPorts lists installers for Golden Gate 27, Tahoe 26, Sequoia 15, and Sonoma 14, with legacy releases identified separately.
Once MacPorts is installed, return to Terminal and install Inetutils. Its default client variant prefixes commands with g:
sudo port install inetutilsUse gtelnet for your connections after installing this package. To inspect the files that MacPorts installed, run:
port contents inetutilsIf you need the unprefixed Telnet executable, the default MacPorts installation provides it at the path below. Replace the host and port placeholders, and adjust the path if you installed MacPorts with a custom prefix:
/opt/local/libexec/gnubin/telnet HOST PORTConnect to your destination
Use your destination’s hostname or IP address and the port of the service you want to reach. For Homebrew’s standalone package, replace both placeholders in this command:
telnet HOST PORTThe same host and port format works with Homebrew GNU Telnet. With the default MacPorts client, use its prefixed command:
gtelnet HOST PORTGNU Telnet also accepts a hostname without a port to connect to the default Telnet service. For MacPorts, substitute gtelnet in this command:
telnet HOSTOrdinary Telnet is unencrypted. Enter the remote system’s login information only when that system requests it.
Use the Telnet prompt and exit
With Homebrew’s standalone client, you can start Telnet without choosing a destination immediately. Run this command to open its interactive prompt:
telnetAt the prompt, use open to start a connection. Supply your destination and service port in place of the placeholders:
open HOST PORTDuring a connection, press Control + ] to return to Telnet command mode. This shortcut assumes the default escape character has not been changed. To exit, enter the following command and press Return:
quitYou can also get help from the Telnet command prompt. Enter the following command to display command help:
?For connection information, use status at the same prompt. Enter:
statusAdjust GNU Telnet settings
With GNU Inetutils Telnet, you can select the IP family using either of the following commands. Choose the option you need, replace HOST, and substitute gtelnet if you use the default MacPorts client:
telnet -4 HOSTtelnet -6 HOSTTo change GNU Telnet’s escape character, use the -e option. Replace CHARACTER with your chosen escape character and HOST with the destination:
telnet -e CHARACTER HOSTYou can also start GNU Telnet while ignoring your .telnetrc startup file. Use the -c option for that connection:
telnet -c HOSTUpdate or remove your Telnet package
Use the package manager that installed your client to update it. For Homebrew’s standalone Telnet package, run these commands in order:
brew update
brew upgrade telnet
If you chose Homebrew Inetutils, update that package instead. After running brew update, enter:
brew upgrade inetutilsFor a MacPorts installation, update MacPorts and then upgrade Inetutils. Run these commands in order:
sudo port selfupdate
sudo port upgrade inetutilsUninstalling Homebrew’s standalone Telnet package removes that client. To remove it, run:
brew uninstall telnetUninstalling Homebrew Inetutils removes its other networking utilities as well as Telnet. To remove the whole package, run:
brew uninstall inetutilsUninstalling MacPorts Inetutils removes the entire package. To remove that installation, run:
sudo port uninstall inetutilsFrequently Asked Questions
Can you choose a Telnet connection from Terminal’s menus?
Yes, open Terminal and choose Shell > New Remote Connection. Select Telnet under Service and your destination under Server, or enter a known IP address in the address field at the bottom. Enter the username in User, then click Connect. This connection interface is separate from installing the Telnet executable.
Can you use Telnet in iTerm2?
Yes, you can use iTerm2 with a separately installed Telnet client. Open Settings > Profiles > General and configure Command with the installed executable and destination. You can also assign Shortcut key to launch that profile.
Is there a native PuTTY app for Mac?
PuTTY says its native Mac port remains unfinished. You can obtain PuTTY tools for macOS through Homebrew, including Plink, which supports command-line Telnet connections.
Can Prompt open a Telnet connection from a link?
With Prompt installed and its URL scheme registered, opening prompt-telnet://HOST or prompt-telnet://HOST:PORT launches Prompt with the connection details filled in. Generic telnet:// links depend on your Mac’s registered handler. You can also open prompt-favorite://NAME to open a saved server by name.