LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-07-2005, 08:29 PM   #1
RajRed
Member
 
Registered: Mar 2005
Posts: 66

Rep: Reputation: 15
rsh and rshd


what is the difference between rsh client program and rshd server program? Do I need both packages installed in each system to run command on remote system via rsh? I have the first one system with rsh client installed. (/usr/bin/rsh), the second system has both rsh and rshd installed, (/usr/bin/rsh and /usr/sbin/in.rshd), both systems has "+ +" entry in both .rhosts and hosts.equiv files and "ALL : ALL : ALLOW" in hosts.allow file, but I still could not get rsh worked?? I tried (rsh -l login second-system "ls") from the first system, I got permission denied. I tried (rsh -l login first-system "ls") from the second system, I got connection refused.

Any suggestion?

Thanks.
 
Old 07-07-2005, 09:00 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You only need the daemon on the host(s) you want to log in to.. Did you make sure it's running.

You probably ought to just use SSH (with key authentication if you need passwordless) unless you have some real reason for wanting RSH (there are a couple, but not very common).
 
Old 07-07-2005, 09:07 PM   #3
RajRed
Member
 
Registered: Mar 2005
Posts: 66

Original Poster
Rep: Reputation: 15
When you said "daemon", do you imply "rshd"?
 
Old 07-07-2005, 09:23 PM   #4
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
rshd is the daemon which listens for connections. rsh is the client. The process is works like this
1. you start the client rsh on the box you are working from.
2. The client then calls the server rshd on the remote box you wish to connect to
3. you enter the username and password for your account on the remote box NOT the local box you are currently using.
4. Authentication is completed and you are connected to a shell service (command line) on the remote box.
 
Old 07-07-2005, 09:28 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
But as btmiller already suggested: try to avoid the "r"tools,
and use ssh instead. ssh is way safer ;}


Cheers,
Tink
 
Old 07-07-2005, 09:43 PM   #6
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
SSH uses the same principles and the best way to go. It includes a much greater level of security by using encryption.
 
Old 07-08-2005, 12:52 AM   #7
RajRed
Member
 
Registered: Mar 2005
Posts: 66

Original Poster
Rep: Reputation: 15
I am in the situation that I dont really care about the security, rsh was built in my testing environment that I can not change.

I installed rshd in the first system and tried "rsh localhost ls" and got "Permission denied", tried "rsh localhost" got

connect to address 127.0.0.1: Connection refused
Trying ::1....

and I did "rexec localhost ls" using "root" user,

localhost: Connection refused
rexec: Error in rexec system call,
rexec: (The following system error my itself be in error)
rexec: Illegal seek

also I did "chkconfig | grep rsh", I got "rsh xinetd".

I can ping and telnet from both systems. The /etc/xinetd.d/rsh looks like the follwing,

service shell
{
socket_type = stream
protocol = tcp
wait = no
user = root
group = root
server = /usr/sbin/tcpd
server_args = /usr/sbin/in.rshd -aL
flags = NAMEINARGS
}
I did "netstat -l --inet", there seems to have an entry

tcp 0 0 *:shell *.* LISTEN

Yast2 showed "shell" as the service instead of "rsh".

Any suggestion?

Thanks.
 
Old 07-08-2005, 01:09 AM   #8
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
The rshd is not running. try this
#ps ax | grep rshd
if you get no output then the rshd is not running. You will need to start it.
 
Old 07-08-2005, 11:50 AM   #9
RajRed
Member
 
Registered: Mar 2005
Posts: 66

Original Poster
Rep: Reputation: 15
How do I start rshd then? I am running on SuSE 9 Linux. There was no service command? I typied "xinetd" but it did not seem to work?

Thanks
 
Old 07-09-2005, 03:45 AM   #10
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
Have a look in your /etc/services file and look rsh make sure it is set to start and not commented out.
 
Old 07-09-2005, 07:23 PM   #11
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
You need to enable it in /etc/xinetd.d/rsh (and rlogin). Change the line "disable = yes" to "disable = no", and restart xinetd. You'll probably also have to add "rsh" and "rlogin" to /etc/securetty.
 
Old 07-11-2005, 06:40 PM   #12
RajRed
Member
 
Registered: Mar 2005
Posts: 66

Original Poster
Rep: Reputation: 15
I dont have "disable" line in the file /etc/xinetd.d/rsh. I think rsh is enabled through xinetd. I can find /usr/sbin/xinetd is running from "ps" command, but I still kept getting "permission denied" error. I also included "rsh" in /etc/securetty. This is a very hard problem..... I gave up.
 
  


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
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 10:34 AM
rsh ziox Linux - Networking 1 10-27-2004 07:11 PM
rsh rightsidedown Linux - Newbie 3 07-16-2004 04:08 PM
how to use rsh?? nqduy Linux - Networking 2 08-21-2003 03:00 AM
Rshd esael Linux - General 1 08-27-2002 04:50 AM


All times are GMT -5. The time now is 03:12 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