How can I disable telnet

Is the default for telnet to be enabled or disabled? How can I disable it?

With no details of your OS, etc, hard to say. Try this:
  • SSH into server and login as root
  • # nano -w /etc/xinetd.d/telnet
  • change disable = no to disable = yes
  • Save and Exit
  • # /etc/init.d/xinetd restart
 
With no details of your OS, etc, hard to say. Try this:
  • SSH into server and login as root
  • # nano -w /etc/xinetd.d/telnet
  • change disable = no to disable = yes
  • Save and Exit
  • # /etc/init.d/xinetd restart

Sorry... I thought I had it in my signature, but that must be on another forum.

CentOS 5
PHP 5.2.5
MySql 5.0.45
DirectAdmin

I tried to run the command you suggested but there is no file right now called /etc/xinetd.d/telnet

Should I create one?? I used locate and there is no file at all. The only one is /etc/bin/telnet, which is not a text file.
 
Does that mean that telnet isn't running, because there is no file there?

Yes, CentOS disables telnet by default, but if you want to feel extra warm and fuzzy, open /etc/xinetd.d/krb5-telnet and look for the line disable = yes to make certain that the kerberized telnet server is disabled (since it also accepts normal telnet sessions).
 
Last edited:
Yes, CentOS disables telnet by default, but if you want to feel extra warm and fuzzy, open /etc/xinetd.d/krb5-telnet and look for the line disable = yes to make certain that the kerberized telnet server is disabled (since it also accepts normal telnet sessions).

Thanks for the help! That file doesn't exist either. I'll assume that everything is cool.
 
you can be sure about that by checking , netstat -a | grep 23
and if there is line like :
*:23 , telnet will be running
 
Of course the easy way to check is, from the command line:
Code:
telnet localhost
Jeff
 
Back
Top