Search This Blog

Wednesday, September 8, 2010

Enable telnet service

Note:
First, telnet is insecure, and allowing root login, is just plain stupid.
Use su or sudo, and even better, use ssh.

By default ,Telnet service is disabled in many distributions (Which is highly recommended).

in redhat/centos4,5 telnet service is can be enabled by modifying following file
/etc/xinetd.d/krb5-telnet.

You just need to change disable parameter to no as below.

# cat /etc/xinetd.d/krb5-telnet
# default: off
# description: The kerberized telnet server accepts normal telnet sessions, \
# but can also use Kerberos 5 authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/telnetd
log_on_failure += USERID
disable = no
}
Just restart xinetd service.
#/etc/rc.d/init.d/xinetd restart
and now you are able to get the telnet session of the server.However it will still not allow you to login using root.


However, if you need to allow access to the terminal that telnet uses for root
Add the following lines to /etc/securetty
pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9
Now you can able to login with root using telnet.

No comments:

Post a Comment