Thursday, October 27, 2005

Disable Telnet - Stop unneeded services on your server

You should never run telnet on your server. Always use sshd. To turn telnet off on your server, edit the file /etc/xinetd.d/telnet and replace


disable = no

with

disable = yes



After stopping, your code will look like:


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



Then restart xinetd



# Telnet is running
netstat -a | grep telnet
# output follows
tcp 0 0 *:telnet *:* LISTEN
#output ends
# now restart
/etc/init.d/xinetd restart
# Check whether telnet is running
netstat -a | grep telnet

0 Comments:

Post a Comment

<< Home