Welcome to Srini's blog

Wednesday, March 10, 2010

Enabling telnet service in Linux

By default telnet service is disabled because of security concerns. Still you want to enable telnet follow the steps

1.Go to /etc/xinetd.d/
2.Open krb5-telnet file . It is like
# 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 = yes
}

3.Edit the file as 'disable = no' and save the file
4.Restart the xinetd server using cmd /etc/init.d/xinetd restart
5.Now check the telnet access by using cmd telnet IP 23 from any machine
6.Still you may not be access telnet due to Ip tables not allowing the port 23
Now you can follow one of the 2 steps below.
i. Edit the IP tables to allow 23 port
a. go to /etc/sysconfig/iptables and add the below entry
-A INPUT -i ppp0 -p tcp -m tcp --sport 513:65535 --dport 23 -m state --state NEW,ESTABLISHED -j ACCEPT
(OR)
ii. Stop the iptables using cmd stop iptables
7. Thts it....

Note : Before enabling telnet service please go thru the security concerns...

No comments:

Post a Comment