Just as a seasoned chef masters his kitchen, a sysadmin must know his way around his servers. One of the tools in a sysadmin’s toolbox is Telnet, a network protocol that enables communication with remote computers. Despite its simplicity and broad use in network diagnostics and development utilities, Telnet is often criticized for its lack of encryption – leaving it open to unauthorized access and data interception. Hence, for secure operations, alternatives like SSH are recommended.
Prerequisites
Before diving into the installation process, you need to ensure that you have the following setup:
- A server running Debian 12 (Bookworm)
- An initial OS installation to avoid potential issues
- SSH access to the server (or Terminal access if you’re on a desktop)
- An active internet connection to download necessary packages for Telnet
- A user account with sudo privileges to run administrative commands
Installation Steps
Here’s how to install Telnet on Debian 12 Bookworm:
Step 1: System Update
Start by updating your Debian OS. This is crucial as it provides the latest security patches and package improvements.
sudo apt update sudo apt upgrade
Step 2: Installing Telnet
Debian’s repositories provide the Telnet package by default, which can be installed using the apt
package manager. Run the following command to install the Telnet package:
sudo apt install telnetd
Post-installation, verify the Telnet service is running correctly by checking its status:
sudo systemctl status inetd
Step 3: Testing Telnet Connection
After installing Telnet, it’s imperative to test the connection to ensure it’s functioning as expected. Connect to your remote server using Telnet with the following command:
telnet 192.168.77.20
Note: Replace 192.168.77.20
with your server’s IP address. A successful connection will present you with the Telnet prompt, allowing interaction with the remote server.
You should see the following output:
Trying 192.168.77.20... Connected to 192.168.77.20. Escape character is '^]'. Debian 12 debian11 login: Shapehost Password: *****
Step 4: Securing Telnet with UFW
Even though Telnet does not provide encryption, you can secure your server with a firewall for added protection. The Uncomplicated Firewall (UFW) is an easy-to-use tool for managing iptables firewall rules. To install and enable UFW, run:
sudo apt install ufw sudo ufw enable
Set default policies and allow Telnet through the firewall with:
sudo ufw allow 23/tcp
Lastly, reload UFW to apply the changes:
sudo ufw reload
Congratulations! You have successfully installed and configured Telnet on Debian 12 Bookworm. For further assistance or additional information, we recommend referring to the official Debian website.
In case you’re searching for a reliable VPS service, ShapeHost offers quality Linux SSD VPS services, making it an ideal choice for businesses. With ShapeHost, you can focus on your core business operations, leaving the complexities of VPS management to the experts.