Operating System - HP-UX
1753974 Members
7161 Online
108811 Solutions
New Discussion юеВ

Troubles with RSH from Linux

 
SOLVED
Go to solution
Kevin McKee
Advisor

Troubles with RSH from Linux

I'm having some troubles remote shelling from Linux Red Hat Enterprise ES 3 to HP-UX 10.20. I AM able to type rsh hostname from my Linux box and successfully connect to the HP-UX box. However, if I issue a command along with the RSH like rsh hostname touch /tmp/test.log, I simply get no response. In the SYSLOG I see the following entries:

When doing rsh hostname and successfully connecting:
usage: rlogind [-l] [-n]
Connection from x.x.x.x on illegal port

When doing rsh hostname touch /tmp/test.log and receiving no output:
usage: remshd [-ln]

Any input would be greatly appreciated.

Thanks in advance,
Kevin
11 REPLIES 11
Stephen Keane
Honored Contributor

Re: Troubles with RSH from Linux

Use remsh on HPUX not rsh.
Patrick Wallek
Honored Contributor

Re: Troubles with RSH from Linux

When doing multiple rsh commands, they should be enclosed in quotes and separated by a semicolon (;).

Try this and see what happens:

From RH Linux:

# rsh hostname "touch /tmp/test.log ; ls -l /tmp/test.log"

I think rsh may be getting confused with the argument to touch.
Kevin McKee
Advisor

Re: Troubles with RSH from Linux

Thanks for the input, but unfortunately that doesn't work. I still get the same response in the SYSLOG on the HP side.
Ermin Borovac
Honored Contributor

Re: Troubles with RSH from Linux

Do you have firewall (iptables) enabled on the linux box?

Remote shell server (remshd on hp-ux) will try to open inbound connection to your linux box in order to pass stderr. This connection is made on a random port below 1023.

Please note that 'rsh ' is handled by rlogind and 'rsh ' by remshd. This explains why 'rsh ' works (rlogind doesn't make any inbound connections).
Kevin McKee
Advisor

Re: Troubles with RSH from Linux

I wondered if it was something to do with trying to connect back to the Linux box as you said, but unfortunately I'm not familiar with that side of things. Can you tell me how to check if those ports are open or not? We're on an internal network so I have no trouble opening those ports if required.

Thanks
Stephen Keane
Honored Contributor

Re: Troubles with RSH from Linux

Do you have kerberos running on the Linux box?
Kevin McKee
Advisor

Re: Troubles with RSH from Linux

How do I tell if I'm running Kerberos or not?
John Poff
Honored Contributor

Re: Troubles with RSH from Linux

Hi,

Do a 'rpm -qa | grep krb' to see if you have the Kerberos packages installed. Do a 'chkconfig --list kshell' to see if you have the Kerberos rsh commands enabled.

JP
Kevin McKee
Advisor

Re: Troubles with RSH from Linux

This is what comes up for the rpm -qa
krbafs-utils-1.1.1-11
krb5-libs-1.2.7-19
krbafs-1.1.1-11
krb5-workstation-1.2.7-19
pam_krb5-1.70-1
krbafs-devel-1.1.1-11
krb5-devel-1.2.7-19

and it says that KSHELL is OFF