Easily connect to a remote server using Telnet on a Mac
- Installing Telnet |
- Using Telnet |
- Using SSH |
- Q&A |
- Tips |
- Warnings
Telnet is a useful application that's been around for decades. You can use it to connect to remote servers for various purposes, such as remotely administering a machine through a Telnet server or manually returning a result from a web server. While macOS no longer comes with the Telnet client, you can easily install it using Terminal. We’ll teach you how to install and use Telnet on your Mac, as well as how to use the more modern and secure SSH protocol.
Quick Steps
- Install the Command Line toolkit and Homebrew in Terminal , if you haven’t already.
- Run the command brew install telnet .
- Enter the command telnet host port . Replace “host” with the hostname or address and “port” with the port number.
Steps
Section 1 of 3:
Installing Telnet on a Newer Mac
-
Open the Terminal application. If you’re using a Mac running any version of macOS later than Sierra (macOS 10.12), you’ll need to install Telnet on your computer. You can do this usingTerminal, which you can find in your Utilities folder.
- Terminal is similar to the command prompt found on Windows. Because macOS is based on UNIX, not MS-DOS, the commands are a bit different.
-
2Install the Command Line toolkit. Before you can install Telnet, you’ll need to install Homebrew. This is a package manager that allows you to install special software and make other modifications to your Mac using the Terminal. The first step is downloading Apple’s Command Line tools.
- In Terminal, type or paste the command xcode-select --install , then press Return .
- You may see a popup window asking you if you want to install the Command Line toolkit. Click Install . If you already have the Command Line toolkit installed, you’ll see an error message instead.
Advertisement -
3Install Homebrew. Once the Command Line toolkit is installed, you can use the Terminal to download Homebrew: [1] X Research source
- If you’re using macOS Catalina or later, start by switching to the bash shell. Enter the command chsh -s /bin/bash and type in your Mac’s administrator password when prompted. Then, restart Terminal.
- Enter the following command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )" . Press Return .
- When prompted, enter your Mac’s administrator password, press Return , then press Return again. Wait for the installation to finish.
- If you prefer, you can also install Homebrew using the .pkg installer from GitHub (scroll down to the Assets section to find the download file).
-
4Enter the Telnet install command. Type or paste the command brew install telnet , then press Return . It may take a few minutes for Homebrew to install Telnet and clean up the installation files.
-
5Download a Telnet client as an alternative. If you’d rather not use Telnet in your Terminal or can’t get these instructions to work, you can install a Telnet client from the App Store. There are several free options, including WebSSH, SSH Client, and Termius.
Advertisement
Section 2 of 3:
Using an Unsecure Telnet Connection
-
1Open Terminal. If you’ve enabled Telnet on your Mac, you can make a telnet connection in theTerminal app. However, be aware that it is an unencrypted and outdated protocol. Use it at your own risk.
- If you’d rather use the more modern SSH protocol (which doesn’t require installing any special software on your Mac), use the secure connection method below.
-
2Enter the telnet command. Type in the command telnet host port , but replace “host” with the hostname, service address, or IP address. Replace “port” with the port number. Press Return to execute the command.
- For example, your command might look like telnet telnet.microsoft.com 44 if you are connecting to a Microsoft telnet server with the port number 44.
- To close the connection , press control + ] and enter the command close , quit , or q .
Advertisement
Section 3 of 3:
Connecting via SSH
-
From the Shell menu, select New Remote Connection . SSH allows you to create a secure connection to a server. Note that SSH is not the same as Telnet, which is an older and less secure protocol. You don’t need to have Telnet enabled on your Mac to use SSH. To start, open Terminal and click Shell in the menu bar at the top of the screen. Then, select New Remote Connection… . [2] X Research source
- Alternatively, press Shift + Command + K .
- Make sure Secure Shell (ssh) is selected in the Service column of the New Remote Connection window.
-
Enter a hostname or IP address. In the field at the bottom of the New Remote Connection window, type in the address of the server you wish to connect to.
- Note that you must have an account with the server to log in.
-
Click Connect . This is the blue button at the bottom right corner of the window.
-
Enter your password when prompted. Your keystrokes will not be displayed for security reasons.
-
Save your settings. Click the + sign under the Server column.
-
Enter the hostname or IP address. The name or IP address you enter here will be displayed in the server connection browser.
- Click OK to save the information you entered.
-
Enter your user ID in the User field. Click Connect to connect to the server.
Advertisement
Community Q&A
Search
-
QuestionHow do I determine the name or IP address to put in the box?Community AnswerIf you are trying to telnet to a personal computer that you have physical access to, the IP address can be found by going to a website like WhatIsMyIP and finding the computer's public IP address. If you are trying to access some kind of service, your provider will provide you with a domain or IP address with port that you should type into the box.
-
QuestionMy terminal says it's not responding. I keep on force-quitting it, but nothing's working. What do I do?Community AnswerMake sure you typed the command correctly. To break out of (most) unresponsive commands, try pressing Ctrl+C.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
- It may not be necessary to enter a port number.Thanks
- To exit the connection, hold type CTRL+] and then type 'quit' and press Return .Thanks
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement
Warnings
- Non-secure connections can easily be intercepted. Use Telnet connections with great caution.Thanks
- Incoming connections and authentication failures are usually logged by most servers, so avoid using Telnet maliciously.Thanks
Advertisement
About This Article
Thanks to all authors for creating a page that has been read 850,773 times.
Advertisement