RedHat/CentOS : Install and configure Telnet

What is Telnet?

Telnet is a computer protocol that provides two-way communication between computers on the internet or local area networks. SSH is recommended as telnet lacks authentication policies and data encryption. Preferably only use telnet within a local area network.

Login as root:


Check if telnet package is already installed on your system:

rpm –qa | grep telnet

Install telnet package:

yum install telnet-server telnet

Add the telnet service to the firewall:

By default, the built-in firewall blocks the Telnet port (port 23) as it is considered as an unsecured protocol.

firewall-cmd –add-service=telnet –zone=public –permanent

Add service to selinux IF SELinux is enabled on the system:

semanage port –a –t telnetd_port_t –p tcp

Start and enable telnet:

systemctl start telnet.socket
systemctl enable telnet.socket

Verify if telnet is working:

Connected to

You’re all set. You can log in to your remote server with a terminal client like putty:

Liked it? Take a second to support Chad Crouch on Patreon!

Chad Crouch

Chad is a Software/DevOps Engineer with exposure and experience in various technologies and enterprise ICT environments. He has a huge passion for Technologies, specifically Linux and Open Source Software. If you enjoy our articles please support us and make a small contribution: Buy Us A Coffee