WebHostGear.com - the hosting resource for professionalshosting tutorials 
hosting howto webhost guide server managementFebruary 09, 2010
server management, apache tutorials, hosting tutorials, cpanel, server security
Home / Hosting Tutorials / Server Security / How to Disable Telnet

How to Disable Telnet



Printer Friendly Printer Friendly Send to a friend Send to a friend
By : ramprage Rating : Average Rating : 6.93 From 28 Voter(s)

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.

New! - Need server help? Hire an Expert

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.

Rate this Article :

1

2

3

4

5

6

7

8

9

10
Poor Excellent

Related Articles


Modify Bandwidth Exceeded Page
Disable Direct Root Logins
Guide to Chkrootkit - checking for intruders
Creating a Welcome message for SSH logins
Securing Your /tmp Partition with Cpanel/WHM


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
}

What Im suppost to change there?
Sinan
on centOS, telnet is disabled by default.

 Add Comment
Name
Email
Image Code
Refresh Image

Comments / Feedback



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

Server Tutorials


WebHostGear Reviewed by Ping Zine - Click here

Links:
Lunarpages Coupon