LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsh and rshd (https://www.linuxquestions.org/questions/linux-newbie-8/rsh-and-rshd-341088/)

RajRed 07-07-2005 07:29 PM

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.

btmiller 07-07-2005 08:00 PM

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).

RajRed 07-07-2005 08:07 PM

When you said "daemon", do you imply "rshd"?

Michael Johnson 07-07-2005 08:23 PM

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.

Tinkster 07-07-2005 08:28 PM

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


Cheers,
Tink

Michael Johnson 07-07-2005 08:43 PM

SSH uses the same principles and the best way to go. It includes a much greater level of security by using encryption.

RajRed 07-07-2005 11:52 PM

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.

Michael Johnson 07-08-2005 12:09 AM

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.

RajRed 07-08-2005 10:50 AM

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

Michael Johnson 07-09-2005 02:45 AM

Have a look in your /etc/services file and look rsh make sure it is set to start and not commented out.

eddiebaby1023 07-09-2005 06:23 PM

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.

RajRed 07-11-2005 05:40 PM

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.
:confused:


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