• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 7 : How to install and configure telnet

by admin

It’s not recommended to use telnet as it is not secure. The passwords are transferred using a plain text and any packet sniffer can easily track you. Nevertheless, it’s sometimes required to install telnet anyways. To check if you have telnet package already installed on your system, use :

# rpm -qa | grep telnet
telnet-server-0.17-59.el7.x86_64
telnet-0.17-59.el7.x86_64

In order to turn Telnet on make sure that you have the packages telnet-server and telnet installed:

Installing telnet packages

If the 2 required packages are not installed, install it using yum.

# yum install telnet-server telnet

Configuring/enabling telnet

1. Add the service to firewalld.

The built in firewalld blocks Telnet port 23 by default because the protocol is not considered secure. Please make sure that the port is open or if a non-default port is being used, that the port associated with Telnet is open for telnet traffic to pass through.

# firewall-cmd --add-service=telnet --zone=public

Run the rule again with the “–permanent” flag for it to persist across firewalld restarts.

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

2. Add the service to selinux.

You will have to also add the service to SELinux. This is required only in the case where SELinux is enabled on the system.

# semanage port -a -t telnetd_port_t -p tcp 

3. Enable and start the telnet service.

Start the service using the systemctl command.

# systemctl start telnet.socket

Enable the telnet service to start at boot.

# systemctl enable telnet.socket

4. Verify

Once you are done with the configuration, verify if the telnet to a server works.

# telnet geeklab02
Trying 10.10.10.10...
Connected to 10.10.10.10.
Escape character is '^]'.

Kernel 3.10.0-327.el7.x86_64 on an x86_64
geeklab02 login: testuser
Password: 
Last login: Sat Jan 23 18:19:43 from geeklab

[testuser@geeklab02 ~]$ hostname
geeklab02
How to Install and configure telnet in RHEL / CentOS 5,6

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. modprobe: command not found
  2. How to Integrate CentOS/RHEL system into an AD Domain with LDAP/Kerberos/SSSD
  3. “Logical volume vg/lv contains a filesystem in use” – while removing LVM filesystem
  4. How to remove unwanted entries in /etc/shadow file
  5. How to Enable Debug Mode for Chronyd Service in CentOS/RHEL 8
  6. What does refid value “.LOCL.” mean in NTP
  7. vmstat: command not found
  8. What are Symbolic Links (Soft Links) and how to create them under Linux
  9. How to uninstall steam from Ubuntu
  10. ldd Command Options in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright