LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-30-2012, 06:45 AM   #1
sree.m
Member
 
Registered: Feb 2012
Posts: 56

Rep: Reputation: Disabled
Red face cant setup rsh in rhel5


Hi,

I am trying to configure rsh in my rhel 5 server. rpm package has been downloaded and installed in the system.

the /etc/xinetd.d directory doesnt have rsh and rlogin files, But /etc/pam.d directory do.

.rhosts file has been created in /root and added the ipaddresses of other systems.

what else am I supposed to do to get this working.Which service needs to be started/restarted ??

Please help.Thanks in advance.

Regards,
Sree
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-30-2012, 08:56 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You REALLY REALLY REALLY should NOT be using rsh. It is an extremely insecure transport standard. You should instead use ssh.

Assuming you are going to do it anyway despite the advice then you should look for any /etc/xinetd.d file that has "rlogin" or "rexec" in it as that is likely the one that enables rsh (as one of the "r" commands).
 
2 members found this post helpful.
Old 03-30-2012, 01:04 PM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,679

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Use SSH utilities

If I found anyone using rsh or rlogin on my network I would immediately lock them out and disable their processes pending investigation. Those were retired as a huge security risk along with telnet and ftp nearly 15 years ago.

As recommended above, use the OpenSSH utilities with proper keys to enable that same functions using ssl encrypted traffic.
There are other options, but OpenSSH was designed to do the functions of the older R* utilities without the security violations and exposures.
 
1 members found this post helpful.
Old 04-02-2012, 06:15 AM   #4
sree.m
Member
 
Registered: Feb 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Thanks for your response.

btw I am in a situation to take backup to tape drive which is attached in another server for which i would need an rsh connectivity to perform the backup.I would stop the rsh service on every servers as soon as the backup is done.

However i cant see any files named rsh,rlogin or rexec inside the directory /etc/xinetd.d. Wt could be the reason ??

Thanks again for your time and help.

Regards,
Sree
 
Old 04-02-2012, 12:13 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
To check for r commands in xinet.d files:
cd /etc/xinetd.d
egrep -i "rsh|rexec|rlogin" *

On my one remaining RHEL4 box I see:
eklogin:# description: The encrypting kerberized rlogin server accepts rlogin sessions \
klogin:# description: The kerberized rlogin server accepts BSD-style rlogin sessions, \
kshell:# description: The kerberized rshell server accepts rshell commands \

You should see something similar.

By the way xinetd isn't a default install as I recall on RHEL4 so you may not have it installed. Run "rpm -q xinetd" to be sure the package itself is installed.
 
1 members found this post helpful.
Old 04-02-2012, 01:10 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,685

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by sree.m View Post
Thanks for your response.
btw I am in a situation to take backup to tape drive which is attached in another server for which i would need an rsh connectivity to perform the backup.I would stop the rsh service on every servers as soon as the backup is done.

However i cant see any files named rsh,rlogin or rexec inside the directory /etc/xinetd.d. Wt could be the reason ??
Spell out your words. And to reiterate what others have said, use SSH. There is NO REASON to use rsh over ssh. SSH is easier to script for, more secure, and more flexible.
 
1 members found this post helpful.
Old 04-02-2012, 01:31 PM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
For extremely large data transfers r commands are faster because they don't encrypt/decrypt. We used to do a database refresh process at a former employer and it kicked off multiple rsyncs. To speed those up we used the option that let us specify rsh but that was many years ago. We also had automated processes in place that would disable r commands in inetd/xinetd periodically so if we forgot to turn off r commands after the transfer it would occur anyway.

For most purposes you really don't want to use r commands. The above was a rather extreme example. I wouldn't want to do it on a daily/nightly basis for backups.
 
1 members found this post helpful.
Old 04-02-2012, 08:24 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Which rsh/rexec/rlogin rpm pkg has been downloaded/installed: client or server ??
 
1 members found this post helpful.
Old 04-03-2012, 01:38 AM   #9
sree.m
Member
 
Registered: Feb 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi MensaWater,

I get the same when run the commands given by you.

Code:
[root@mylinux xinetd.d]# egrep -i "rsh|rexec|rlogin" *
eklogin:# description: The encrypting kerberized rlogin server accepts rlogin sessions \
klogin:# description: The kerberized rlogin server accepts BSD-style rlogin sessions, \
kshell:# description: The kerberized rshell server accepts rshell commands \


[root@mylinux xinetd.d]# rpm -q xinetd
xinetd-2.3.14-10.el5
rsh version is-
Code:
[root@mylinux xinetd.d]# rpm -q rsh
rsh-0.17-40.el5
Still i cant use rsh to this system.

Regards,
Sree
 
Old 04-03-2012, 01:40 AM   #10
sree.m
Member
 
Registered: Feb 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi TB0ne,

What else can be done to take backup to tape which is in a different server??

To my knowledge 'dump' will use rsh to connect to remote server for backup. Any way to use ssh for dump command ??

Regards,
Sree
 
Old 04-03-2012, 01:42 AM   #11
sree.m
Member
 
Registered: Feb 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi chrism01,

rpm package installed was rshserver-0.17

regards,
Sree
 
Old 04-03-2012, 03:29 AM   #12
sree.m
Member
 
Registered: Feb 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi all,

Installing a new rsh-server rpm sorted all my problems out(seems the old rpm was not the correct one).I have done necessary configuration post installation and restarted xinetd service which made the rsh connectivity alive on my system. I had no way other than setting up rsh, though I understand the security risk of using rsh on servers (thanks for bringing out this info).

Can somebody advice me the impact of restarting "xinetd" service in a production-cluster environment ?? (if this doubt can be continued in the same thread)

Thanks to all for great helps

Regards,
Sree
 
Old 04-03-2012, 07:28 AM   #13
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You don't even have to stop/start it. Just run "ps -ef |grep xinetd" then run "kill -1 <pid>" on the xinetd process ID. This sends a sighup to it. Both inetd/xinetd are designed to reread their configurations when they receive a sighup.

Also restarting xinetd should have no impact so long as it is done quickly:

service xinetd restart - would do it.

inetd/xinetd are simply daemons that "listen" for connections and are there to prevent having to run multiple other application specific daemons running all the time when they might only be needed once in a while. Once inetd/xinetd gets a request for a specific port it starts the application which handles the connection after that so shutting down inetd/xinetd has no impact on application connections already running.

So in a full restart inetd/xinetd would be sound for an extremely short period of time.
 
Old 04-03-2012, 09:55 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,685

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by sree.m View Post
Hi TB0ne,
What else can be done to take backup to tape which is in a different server?? To my knowledge 'dump' will use rsh to connect to remote server for backup. Any way to use ssh for dump command ??
Putting "linux dump over ssh" into Google pulls lots...did you try that?
http://www.commandlinefu.com/command...t3-fs-over-ssh
http://www.justskins.com/forums/dump...sh-131231.html
 
  


Reply



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
RSH connection refused in RHEL5 saigiridhar Red Hat 12 12-18-2011 08:24 PM
How to setup ssh and rsh in Linux ? eng_mohammedmostafa Linux - Software 2 04-24-2010 06:14 PM
[SOLVED] Problem to setup RSH jauch Linux - Networking 4 11-19-2009 02:47 PM
rsh Setup maxy7710 Linux - Newbie 3 03-31-2009 01:16 AM
'rsh' - setup RedOctober45 Linux - Software 1 01-11-2008 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:29 AM.

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
Open Source Consulting | Domain Registration