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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. Linux Network File System (NFS) interview questions
  2. http-server-upload Command Examples
  3. pstree: command not found
  4. Linux OS Service ‘squid’
  5. csv-diff: View differences between two CSV, TSV or JSON files
  6. sacctmgr: command not found
  7. alacritty – Cross-platform, GPU-accelerated terminal emulator (Command Examples)
  8. How to convert text files to all upper or lower case
  9. ansiweather – A shell script for displaying the current weather conditions in your terminal
  10. Linux: No space left on device while df command shows a lot of free space

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright