How to Install Telnet on Ubuntu 22.04

Install Telnet on Ubuntu 22.04

In this article, we will have explained the necessary steps to install Telnet on Ubuntu 22.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

In Linux, the telnet command is used to establish the connections between different machines. It connects to servers and network equipment over port 23. You can also use Telnet to check open ports on a remote system.

Prerequisite:

  • Operating System with Ubuntu 22.04
  • Server IPv4 Address with Superuser Privileges (Root Access)
  • Gnome Terminal for Linux Desktop
  • PuTTy SSH client for Windows or macOS
  • Powershell for Windows 10/11
  • Familiar with APT Commands

Install Telnet on Ubuntu 22.04 LTS

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

sudo apt update
sudo apt upgrade
sudo apt install software-properties-common apt-transport-https wget

Step 2. Install Telnet.

Installing Telnet on your Ubuntu 22.04 Jammy Jellyfish system is straightforward, Now execute the following command on the command line to install the Telnet:

sudo apt install telnetd

When your installation is completed, verify that is active and running on your Ubuntu 20.04:

sudo systemctl status inetd

Step 3. Configure Firewall.

Now allow port 23 which is the native port that telnet uses on the firewall:

sudo ufw allow 23
sudo ufw allow from <ip or subnet> to any port 23

Step 4. Test Connection.

It’s time to connect the Telnet server from the remote system. For example, to test port 80 on the remote system (IP 192.168.0.77) run the following command:

telnet 192.168.0.77

You will be asked to enter your username and password. After successful authentication, you should see the following output:

Trying 192.168.0.77...
Connected to 192.168.0.77.
Escape character is '^]'.
Ubuntu 22.04 LTS
ubuntu2204 login: meilana
Password:  
Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-41-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.
Last login: Mon Sep 07 09:51:42 2022 from 192.168.0.33

You can also use Telnet to test open ports on a remote system. For example, to test port 80 on the remote system (IP 192.168.0.77) run the following command:

telnet 192.168.0.77 80

That’s all you need to do to install Telnet on Ubuntu 22.04 LTS Jammy Jellyfish. I hope you find this quick tip helpful. For further reading on the installation of Telnet network protocol, please refer to their official knowledge base. I hope this article was helpful to you. If you find it useful, don’t forget to share it with your friend and family. Also, if you have any questions, please feel free to ask in the comments section. We are always there to assist you.