This discussion is archived
1 Reply Latest reply: Feb 1, 2012 9:50 PM by 520278 RSS

rsh <remote_host> works but rsh <remorte_host> <remote_command> hangs

520278 Newbie
Currently Being Moderated

I am trying to run a command on a <remote_host> from a <local_host> using rsh.

The <local_host> from which I am running rsh is Solaris 10 (SunOS ssapp0950 5.10 Generic_142900-10 sun4v sparc SUNW,SPARC-Enterprise-T5220 Solaris).

The <remote_host> on which I want to run the command is Linux (some vendor customised version and that is all I can say).

I have to use rsh and not ssh as ssh is not installed (and cannot be installed) on the <remote_host>.

rsh <remote_host> from the <local_host> to the <remote_host> works fine and I can successfully rlogin in to <remote_host>.

But rsh <remote_host> <remote_command> hangs.

I know that rsh <remote_host> is actually rlogin <remote_host> using port 513 and rsh <remote_host> <remote_command> is rsh using port 514.

There is a firewall between the <local_host> and the <remote_host> but it has been opened for both port 513 and 514.

telnet from the <local_host> to the <remote_host> to ports 513 and 514 passes through the firewall OK.

And snoop seems to indicate that the firewall is passing traffic OK between the <local_host> and the <remote_host> for rsh <remote_host> <remote_command>.

In a previous environment with the <local_host> Solaris 8 and no firewall but the <remote_host> the same both rsh <remote_host> and rsh <remote_host> <remote_command> work.

It is confusing because I thought at first it was a firewall problem but telnet and snoop seem to indicate it is not.

I am using the same user (same group) on both the <local_host> and the <remote_host> and I think the name resolution of the <local_host> by the <remote_host> is correct i.e. the <local_host> IP address being used by the <remote_host> to reply to the <local_host> is correct.

The <local_host> has several network interfaces with different corresponding IP addresses and I have tried using each of them, configuring the corresponding IP addresses of the <local_host> on the <remote_host>, without success.

The <local_host> and <remote_host> network services seem to be running OK:

svc:/network/login:rlogin and svc:/network/shell:default on the <local_host> and

in.rlogind and in.rshd on the <remote_host>.

I have trawled through the forums without success.

There are no error messages at all - nothing about unknown hosts or bad permissions - it just hangs.

Here is some sample snoop output for "rsh flsc pwd" on the Solaris 10 <local_host> (ssapp0950). flsc-sysa is the <remote_host>:

$ rsh flsc pwd

$ snoop -d vnet456001 flsc
ssapp0950 -> flsc-sysa RSHELL C port=939
flsc-sysa -> ssapp0950 RSHELL R port=939
ssapp0950 -> flsc-sysa RSHELL C port=939
ssapp0950 -> flsc-sysa RSHELL C port=939 938\0

Here is some sample telnet output for "telnet flsc 513" and "telnet flsc 514" on the Solaris 10 <local_host>:

bash-4.0$ telnet flsc 513
Connected to flsc-sysa.
Escape character is '^]'.

bash-4.0$ telnet flsc 514
Connected to flsc-sysa.
Escape character is '^]'.

Could it be caused by some mismatch in the <local_host> and <remote_host> Unix Shell environments ?

Any suggestions greatly appreciated.

  • 1. know where it hangs
    520278 Newbie
    Currently Being Moderated
    I have determined that the hang happens after the following packets are exchanged:

    ssapp0950 -> flsc RSHELL C port=536

    flsc -> ssapp0950 RSHELL R port=536

    ssapp0950 -> flsc RSHELL C port=536

    ssapp0950 -> flsc RSHELL C port=536 *535*\0 *← HANGS AFTER THIS PACKET IS SENT*

    which has the corresponding system calls on the ssapp0950 server:

    $ 2>&1 truss rsh flsc pwd

    getsockopt(7, tcp, TCP_ANONPRIVBIND, 0xFFBF29E0, 4, SOV_DEFAULT) = 0

    setsockopt(7, tcp, TCP_EXCLBIND, 0xFFBF29E0, 4, SOV_DEFAULT) = 0

    listen(7, 1, SOV_DEFAULT) = 0

    write(6, " *5 3 5*\0", 4) = 4

    pollsys(0xFFBF0B38, 2, 0x00000000, 0x00000000) (sleeping...) *← HANGS AT THIS SYSTEM CALL*

    What is this Port (Port *535*) used for ?



  • Correct Answers - 10 points
  • Helpful Answers - 5 points