General
cancel
Showing results for 
Search instead for 
Did you mean: 

HP-UX 11.00 rsh command output not being returned

SOLVED
Go to solution
Vanessa Mason
Occasional Advisor

HP-UX 11.00 rsh command output not being returned

I am working on a HP-UX 11.00 server. when i issued the following command rsh hostname "command", the command output is not being returned to my screen. there are not erorrs or messages to indicate why. i have setup /etc/hosts.equiv and .rhosts in my home directory. I verified that lines are uncommented in /etc/inetd.conf. Still not working. What am i missing?
19 REPLIES
Duncan Edmonstone
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

rsh is not the command you think it is.

On HP-UX rsh is the "restricted POSIX shell" - not remote shell - which is something completely different.

Try:

remsh hostname "command"

you should meet with more success.

HTH

Duncan

HTH

Duncan
Vanessa Mason
Occasional Advisor

Re: HP-UX 11.00 rsh command output not being returned

i just tried using remsh with same results -command output not be returned to my display.
TTr
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

What exactly is returned to your command?

Have you setup the .rhosts files on the remote server?
Does the remote server run the remshd (rshd) service?
Do you have network access to the remote server?
Steven Schweda
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

> What am i missing?

man rsh
man remsh

And a transcript showing the actual commands
you used with their actual output (instead of
a vague description).
TTr
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

> i have setup /etc/hosts.equiv and .rhosts in my home directory. I verified that lines are uncommented in /etc/inetd.conf.

Did you do all these on the remote server? Did you reload the /etc/inted.conf after uncommenting the remsh/rsh line? Any errors on the syslog of the remote server? What kind of server is the remote server?
Matti_Kurkela
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

Your connection attempt may be hitting a network firewall. Often firewalls are configured to silently eat non-approved traffic instead of responding with a "connection refused" message.

It also might be a hostname resolution problem.

After entering the remsh/rsh command, wait for about 3 minutes. You should eventually get an error message. If it's "Connection timed out", start looking for firewalls.

If the message is something along the lines of "Host not found", start checking your hostname resolution: /etc/nsswitch.conf, /etc/resolv.conf and /etc/hosts.

If the connection does not seem to time out at all, and your network administrator is extra clever, you may have been redirected into a tar-pit: a decoy server accepts the connection with a correct response, but sends it out as slowly as possible, pretending to be totally overloaded. The purpose of this is to detect network scan attempts and make scanning more time-consuming.

MK
MK
Vanessa Mason
Occasional Advisor

Re: HP-UX 11.00 rsh command output not being returned

i am doing:

rsh hostname "echo ok" i should get an ok back but i only get the prompt. i tried remsh with the same results.

1)I have .rhosts set up in my home directly which is nfs mounted.

2)The remote server is running remshd.

3) I do have network access to the remote server.

4)I did verify the changes on remote server and inetd was restarted.

5) There are no errors in the syslog

6) Server is a J5000 running 11.00.
Hakki Aydin Ucar
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

did you try like this full path :

remsh hostname "/usr/bin/echo"
Vanessa Mason
Occasional Advisor

Re: HP-UX 11.00 rsh command output not being returned

Still not getting anything back. checked syslog and message files (no errors).

To make sure local server is working properly, did remsh to an 11i server which returned ok.
TTr
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

> I have .rhosts set up in my home directly which is nfs mounted.

Is that on the remote server?

> Server is a J5000 running 11.00.

I assume that is the remote server.

What OS is the local server? What is the login name on the local server?
Vanessa Mason
Occasional Advisor

Re: HP-UX 11.00 rsh command output not being returned

local server is SOlaris 10. i am logged on as myself on local server.
TTr
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

Does the "myself" account exist on the J5000 server?
On the J5000 server in the "myself" home directory does the .rhosts exist? Does it contain the name of the solaris10 server? Is is ONLY readable by the "myself" account? It must NOT be writable by the group or by others.

On the solaris10 server type
"rsh j5000-server-name" and tell us what the output is.
TTr
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

Two more things to check. On the J5000 server look in /etc/inetd.conf and find the "shell" line. Ensure that the remshd does not have the "-l" option.
Check the /var/adm/syslog/syslog.log on the J5000 to see if it logs anything when you run rsh on the solaris server.
Hakki Aydin Ucar
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

>Vanessa: local server is SOlaris 10. i am logged on as myself on local server.

So recommendation: did you try remsh from HP-UX to Solaris ?
if it works it remained of some event in past I faced. I was able to remsh from one Solaris 10 server to another Solaris 8 but vice versa ; from 8 to 10 , I was unable to do even though all setups were correctly on both server.
It turned out a special software caused this on Solaris 8.
This is my history, maybe ,you can look at the problem another side.
Fabio Ettore
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

Hi Vanessa,

suggestions to isolate the issue:

- as already mentioned try viceversa from HP-UX to Solaris: does it work?
- do other systems remsh successfully to the HP-UX system?
- does the HP-UX system itself to remsh itself (remsh localhost date)?
- does the Solaris box remsh successfully to other systems?
- if all of above don't point to a direction I suggest using truss (afaik it's the tusc on Solaris).

Anyway I wouldn't be sure the problem is on HP-UX side.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Vanessa Mason
Occasional Advisor

Re: HP-UX 11.00 rsh command output not being returned

suggestions to isolate the issue:

- as already mentioned try viceversa from HP-UX to Solaris: does it work? YES

- do other systems remsh successfully to the HP-UX system? NO

- does the HP-UX system itself to remsh itself (remsh localhost date)? remshd: getservbyname

- does the Solaris box remsh successfully to other systems? YES

- if all of above don't point to a direction I suggest using truss (afaik it's the tusc on Solaris).
Steven Schweda
Honored Contributor

Re: HP-UX 11.00 rsh command output not being returned

> - does the HP-UX system itself to remsh itself (remsh localhost date)? remshd: getservbyname

It might be helpful if you would simply
copy+paste the actual command with its actual
output, so we wouldn't need to guess what
you're doing and what happened when you did
it.

On the HP-UX system:

hostname
cat /etc/hosts
remsh localhost # No command here.
remsh
Fabio Ettore
Honored Contributor
Solution

Re: HP-UX 11.00 rsh command output not being returned

If the remsh fails even on localhost definitely the problem is on HP-UX side.
Message "remshd: getservbyname" could be a known issue fixed by patch PHNE_33790:

8606268453:
remshd fails to execute when the service name database
does not contain an entry for "kshell", and displays the
message: "remshd: getservbyname".


Check if the patch is installed, if it's not so you can install it even now (it doesn't have dependencies, no reboot, only 474Kbytes).

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Vanessa Mason
Occasional Advisor

Re: HP-UX 11.00 rsh command output not being returned

Thanks everyone. Fabio's suggestion to install patch resolved the problem.