CentOS / RHEL 6 : How to disable telnet service

For security purposes, administrators may wish to disable telnet (incoming connections) on CentOS / RHEL 6. Follow the steps below to disable telnet permanently on your system.

1. For disabling the telnet server, edit /etc/xinetd.d/telnet and change the field disable to yes.

# vi /etc/xinetd.d/telnet
service telnet
{
    flags       = REUSE
    socket_type = stream        
    wait        = no
    user        = root
    server      = /usr/sbin/in.telnetd
    log_on_failure  += USERID
    disable     = yes 
}

2. Now erestart the xinetd service with the below command.

# service xinetd restart
Related Post