LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2008, 11:30 PM   #1
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
how to disable telnet in RHEL4?


how to disable telnet in RHEL4?
 
Old 09-08-2008, 11:51 PM   #2
nny0000
Member
 
Registered: Aug 2003
Distribution: Slackware, Ubuntu
Posts: 158

Rep: Reputation: 30
To the best of my knowledge you can run:

/etc/init.d/telnet stop

at the command line to stop it.

If you want to stop it on reboots, you need to find out what run level you are running on (usually 3 or 5) and go into the /etc/rc.d/ folder and delete the telnet file (or remove the read permissions).

This will prevent the system from starting it on reboots.
 
Old 09-09-2008, 12:16 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
In RHEL4 telnet is governed by xinet service. You can disable login by editing the file /etc/xinet.d/telnet.
You can have more control through this.

Else you can deny telnet logins from /etc/hosts.deny file as well.
 
Old 09-09-2008, 02:46 AM   #4
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Original Poster
Rep: Reputation: 37
thanks for all your reply.

I cannot find all your files given guys!
what I have here in RHEL4 is /etc/xinetd.d/

[root@localhost etc]# cd xinetd.d
[root@localhost xinetd.d]# ls
chargen daytime echo finger krb5-telnet rsync time-udp
chargen-udp daytime-udp echo-udp gssftp kshell tftp
cups-lpd dbskkd-cdb eklogin klogin ktalk time
[root@localhost xinetd.d]#

and I have this "krb5-telnet".

[root@localhost xinetd.d]# /etc/xinetd.d/krb5-telnet stop
bash: /etc/xinetd.d/krb5-telnet: Permission denied
[root@localhost xinetd.d]# cd /

[root@localhost /]# /etc/xinetd.d/krb5-telnet stop
bash: /etc/xinetd.d/krb5-telnet: Permission denied
[root@localhost /]#

[root@localhost /]# uname -r
2.6.9-55.ELsmp

I hope you can help me again...Thanks a lot

Last edited by RMLinux; 09-09-2008 at 02:50 AM.
 
Old 09-09-2008, 03:47 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
You should edit the file /etc/xinetd.d/krb5-telnet and change "disable = yes". Then restart xinetd.
You can also use chkconfig to disable telnet.
Code:
chkconfig krb5-telnet off
For details take a look at chkconfig manpage
 
Old 09-09-2008, 03:47 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Create a file called telnet in /etc/xinet.d and copy the contents in it:

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

You may want to edit them as per your requirement.
But the simple solution is to disable from /etc/hosts.deny file.
 
Old 09-09-2008, 03:54 AM   #7
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by linuxlover.chaitanya View Post
Create a file called telnet in /etc/xinet.d and copy the contents in it:

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

You may want to edit them as per your requirement.
But the simple solution is to disable from /etc/hosts.deny file.
my friend i dont have /etc/xinetd.

I have /etc/xinetd.d/.

I will create that file on /etc/xinetd.d/ is that okay?
 
Old 09-09-2008, 03:56 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Yeah that was a typo mistake.
its xinetd.d
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
enable vista to telnet RHEL4 RMLinux Red Hat 2 09-09-2008 09:36 AM
remote backup from RHEL4 to another RHEL4? dkgoalie Linux - Newbie 2 10-27-2006 11:14 PM
Enable and Disable security services(FTP,TELNET,FINGER.....) pasupuleti Linux - Security 7 09-05-2006 07:27 AM
SSH/Telnet, disable root login, how? muhazam Linux - Security 6 08-17-2004 12:49 PM
telnet - disable it? Jimbo Mahoney Linux - Security 6 11-27-2001 04:19 AM


All times are GMT -5. The time now is 12:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration