• 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 6 : How to Disable / Enable direct root login via telnet

by admin

By default root is not allowed to login through telnet for security reasons. Passwords are transmitted in plain text when you use telnet. For this reason, the root user is not allowed to connect using telnet by default.

To verify root is disabled we can check the config file /etc/xinetd.d/telnet. When the parameter disable is set to yes, root user can not telnet into the system.

# vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses 
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = yes
}

Enabling root access

To enable root telnet login edit the /etc/xinetd.d/telnet file and set the disable parameter to no.

# vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses 
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = no
}

Disabling root access

In case you want to disable the access again, put yes against the disable parameter in the file /etc/xinetd.d/telnet.

# vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses 
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = yes
}
CentOS / RHEL : How to Disable / Enable direct root and non-root user ssh login
CentOS / RHEL : How to disable root login or root access on a system

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to get the date and time of executed command in the history command output
  2. How to manage File and Directory Permissions/Ownerships in Linux
  3. How to Disable TLS 1.1 Cockpit port 9090
  4. CentOS / RHEL : iptables troubleshooting guide
  5. What are the Network Bonding Modes In CentOS / RHEL
  6. What are DNS Nameserver Types in Linux
  7. How to Manage Virtual Machines from the CentOS/RHEL 8 Web Console-Cockpit
  8. How to Compress and Extract Files and Directories in Linux Using gzip and bzip2
  9. How to configure AD group in sudoers file to provide sudo access to users on Linux system
  10. groupmems Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • What are /dev/zero and /dev/null files in Linux
  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright