Voxfor - All rights reserved - 2013-2025
We Accepted





Telnet is a versatile network protocol that enables users to interact with remote systems, such as Linux VPS servers. It is less secure than protocols like SSH, but Telnet can still be useful for specific tasks, such as testing network services or checking open ports using Telnet. This guide will provide you with a step-by-step approach to how to use telnet on linux, with easy-to-follow examples.
Telnet stands for TerminaL Network. It enables users to connect to remote servers over a network. Once connected, you can run commands on a server as you are directly working with it. While SSH (Secure Shell) is the preferred choice for most remote connections due to its good security, Telnet is still valuable for many tasks like:
Telnet may not be pre-installed on your Linux VPS server. To check if it is available, open your terminal and type:
telnet
If you see a message like bash: telnet: command not found, it means Telnet is not installed. Depending on your Linux distribution, you can easilyย install Telnet using the package manager.
Run the following commands:
sudo apt install telnet
Use these commands:
sudo yum install telnet
After you have finished the installation, you can use Telnet.
To connect to a server using Telnet, use the following telnet syntax:
telnet [hostname or IP address] [port]
Below are some telnet examples which can be used for running the commands
To connect to a VPS server using telnet on IP address 192.168.1.5, enter:
telnet 192.168.1.5
If successful, it’ll ask for your login details.
Telnet can check if a specific port on a remote VPS is open. For instance, to use telnet to test port, if port 80 (commonly used for HTTP) is open on a web server, use:
telnet example.com 80
If the connection succeeds, the port is open. If it fails, the port may be closed, or the server is unreachable.
You can use Telnet to send HTTP requests to a web server running on your VPS. Connect to the server’s HTTP port (port 80) with:
telnet example.com 80
After connecting, type the following to make an HTTP request:
GET / HTTP/1.1
Host: example.com
After pressing Enter twice, the server should respond with the HTML content of the webpage.
Telnet is helpful for testing email servers by connecting to their specific ports. To test an SMTP server using Telnet (used for sending emails) on port 25, use:
telnet mail.example.com 25
Once connected, you can manually send commands like:
HELO
MAIL FROM:
RCPT TO:
These commands help test the server’s functionality.
To Exit a Telnet session, follow these steps:
quit
This action ends the session and brings you back to the terminal.
Here are some common issues when using Telnet and their solutions:
It means the server is not allowing connections on the specific port you are trying to access. Make sure that the service is running on the server and that the port is open.
It could be network problems, an incorrect IP or hostname, or a firewall preventing the connection. Verify that the server is reachable and that there are no firewall rules preventing access.
If the Telnet command isn’t recognized, it means Telnet is not installed. Refer to the installation section to resolve this issue.
Plain Text data sent through telnet can mean that third parties have access to your usernames, passwords, and any other sensitive information you transmit. It is better to use SSH for a secure connection to your VPS server.
Telnet is a resourceful tool for network diagnostics and troubleshooting on Linux systems. Telnet can be handy in Linux in determining whether an open port is being used or if the network service associated with it is available. If you need to connect to remote servers (or even the hosts right on your PC) and run some commands as if you were physically present, that’s where the telnet command in Linux comes in. Although Telnet lacks encryption compared to alternatives like SSH, it’s still valuable in controlled environments. We’ve covered how to install Telnet on Linux, including Ubuntu and Debian, along with sample Telnet syntax and commands.
If you’re managing a VPS and need reliable performance, explore Voxfor’s Lifetime VPS for a robust, secure solution that’s built to last.
Vinayak Baranwal wroteย this article.ย Use the provided link to connect with Vinayak on LinkedIn for more insightful content or collaboration opportunities.