Telnet sends clear text passwords and usernames through logins and should be disabled on all web servers and replaced with SSH. Some hosting providers are not disabling telnet by default but you should ensure that it has been turned off as it's a great security risk to your servers. TELNET server listens for incoming messages on port 23, and sends outgoing messages to port 23.
1. Login to your server through SSH and su to root.
2. Type pico /etc/xinetd.d/telnet
3. Look for the line: disable = no and replace with disable = yes
4. Now restart the inetd service: /etc/rc.d/init.d/xinetd restart
5. Turn off it through chkconfig as well because it can still start through that. /sbin/chkconfig telnet off
6. Scan your server to ensure port 23 is closed. nmap -sT -O localhost Also run ps -aux | grep telnet and if you find anything other than "grep telnet" as result kill the process.
Get professional help with your configuration, script installation or server issue. Learn how we can help you with any server problem and make your server run like new. Professional staff will contact you, after submitting a quote request, by phone or email.
Discuss this article with others in our new hosting forums
Comments / Feedback
Bit
pico /etc/xinetd.d/telnet
file empty
Artin
in Centos 4 you should modify this file :
/etc/xinetd.d/krb5-telnet
Damas
pico /etc/xinetd.d/telnet
file empty
the same problem
Felipe D.
on CentOS is:
/etc/xinetd.d/krb5-telnet
Rico
I don't know how to log in to my server to disable my telnet. Please advise.
Jonathan
This is what I see in nano /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 = yes
}
Our site offers free hosting tutorials, cpanel tutorial, web hosting news, shell commands, running a web hosting business, dedicated guides, linux tutorial, apache install, home web server, web server guide, ssh commands, dedicated servers, DNS nameservers, chkrootkit, apf firewall, exim configuration, server compromised, cron backup solution, ftp backup script
pico /etc/xinetd.d/telnet
file empty