1834926 Members
2627 Online
110071 Solutions
New Discussion

Re: Problems with rsh

 
Donnie Brasco
New Member

Problems with rsh

I'm having problems accessing the .rhosts file from an rsh command

I'm trying the following command

rsh uxhost -l uxuser uxcommand

and keep getting the following error message:--

permission denied
rsh: can't establish connection.


I'd seen this problem before on this forum and the the solution then was to add entries to the .rhosts file for the local pcname. I've tried all combinations for the local pcname and +, + +, uppercase, lowercase and all result in the same error

I've also tried with different permissions set on the .rhosts file - rwxrwxrwx,rw-------, rw-r--r-- everything still fails.

Even when I'm sitting on the Unix box itself and try and rsh to myself I get the error occurring. (i.e. rsh ipaddress command)


Can anyone help?
4 REPLIES 4
Massimo Bianchi
Honored Contributor

Re: Problems with rsh

Hi,
check the following:

- does the user have the password ? if no, set it.

- does remsh works ?

- what commands are you trying to issue ? in the "man rsh" i found this:

BUGS
If you are using csh(1) and put a rsh in the background without redirect-
ing its input away from the terminal, it will block even if no reads are
posted by the remote command. If no input is desired you should redirect
the input of rsh to /dev/null using the -n option.

You cannot run an interactive command (like rogue(6) or vi(1)) using rsh;
use rlogin(1) instead.

Stop signals stop the local rsh process only; this is arguably wrong, but
currently hard to fix for reasons too complicated to explain here.

- check your /etc/inetd.conf and inetd.sec.



HTH,
Massimo
Chris Vail
Honored Contributor

Re: Problems with rsh

In HPux, the rsh command is known as remsh. What you're using is "restricted shell" which is a standard shell with a bunch of security stuff. What you want is remsh or remote shell.

Try "remsh HOST COMMAND" and see what happens.



Chris
Dario_1
Trusted Contributor
Kevin Wright
Honored Contributor

Re: Problems with rsh

'rsh' is remsh in HPUX for some reason. Better yet, you should setup ssh.
ssh -l username host "cmd"