Operating System - HP-UX
1838334 Members
3100 Online
110125 Solutions
New Discussion

Re: No output from remsh -n

 
Dale Barnes
Advisor

No output from remsh -n

I have a machine sitting on a different network, call it A.
When I issue the command:

remsh A ls, e.g.,

I receive normal output. However, when I add a -n
to the command, I get no output:

remsh A -n ls


Has anyone encountered this behavior?
"I try to avoid experience; most experience is bad." - Wilde
7 REPLIES 7
Pal Szabo_1
Valued Contributor

Re: No output from remsh -n

By default remsh reads its standard input and sends it to the remote command because
remsh has no way to determine wheter the remote command requires input.

The -n option redirects standard input to remsh from /dev/null.

/usr/bin/sh automatically redirects its input from /dev/null when jobs are run in the background.


My questions:
1, Which shell do you use?
2, Try this example:

remsh hosta read
remsh hosta -n read

Does it works?

3, Do you use .rhosts file?
Dale Barnes
Advisor

Re: No output from remsh -n

well, if I solved the problem
a year ago, I'v forgotten
the answer....
My questions:
1, Which shell do you use?
ksh
2, Try this example:

remsh hosta read <remsh hosta -n read <
Does it works?

3, Do you use .rhosts file?
yes
"I try to avoid experience; most experience is bad." - Wilde
James A. Donovan
Honored Contributor

Re: No output from remsh -n

try adding "&" to your command...
e.g. remsh A -n ls &

Remember, wherever you go, there you are...
Rajeev  Shukla
Honored Contributor

Re: No output from remsh -n

Try loging the Internet services connection details and see what it says. Definately you should be able to figure out why its happening.
run inetd -l and you'll see all messages in syslog. Di it on server A or on both.

Rajeev
Frank Slootweg
Honored Contributor

Re: No output from remsh -n

[Please do not re-open a two-year old thread *and* open a new one.]

From your other thread ( http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7ea1e3ed7640d71190080090279cd0f9,00.html ) :

Works fine for me.

Perhaps you should first try this on each of the involved systems to itself, i.e.

remsh `hostname` -n date

If you still need help, then please give details about the systems and account involved.

Dale Barnes
Advisor

Re: No output from remsh -n

> [Please do not re-open a two-year old thread *and* open a new one.]
Sorry-
the gist from the other thread was that that if I redirect standard input in
_any_ fashion, standard output vanishes... This includes using remsh -n,
redirecting stdin with < or |, or putting the remsh in a cronjob:
sys_hp5:> remsh sys_sun12 date
Fri Feb 21 09:41:50 EST 2003
sys_hp5:> echo 'junk' | remsh sys_sun12 date
sys_hp5:>

btw- the remote command *does*
execute; just my standard from the remote command vanishes....

The local system is hpux11, the remote system is Solaris 8.
Doing the remsh to itself on either system works fine.

sys_hp5:~> remsh `hostname` uname -a
HP-UX sys_hp5 B.11.00 U 9000/889 63621341 unlimited-user license
sys_sun12:~> remsh `hostname` uname -a
SunOS sys_sun12 5.8 Generic_108528-17 sun4u sparc SUNW,Ultra-Enterprise

My account defaults to ksh on both boxes, with a .rhosts on the
remote system just between the two hosts.
sys_sun12:~> cat ~/.rhosts
sys_hp5 barnes

>try adding "&" to your command...
>e.g. remsh A -n ls &
Doesn't appear to alter anything:
$ remsh sys_sun12 date
Fri Feb 21 09:28:41 EST 2003
$ remsh sys_sun12 -n date
$ remsh sys_sun12 -n date &
[1] 26749
$
[1] + Done remsh sys_sun12 -n date &
$

> run inetd -l and you'll see all messages in syslog. Di it on server A or on both.
nothing shows up on server A in syslog, the remote server is a Solaris box,
inetd doesn't have the -l.

"I try to avoid experience; most experience is bad." - Wilde
Frank Slootweg
Honored Contributor

Re: No output from remsh -n

It looks like you have to troubleshoot this on the Solaris side, i.e. *similar* (but not the same) as was suggested for the HP-UX inetd. Hopefully other posters can help with the Solaris side.

Have you also tested things the other way around, i.e. Solaris client to HP-UX server? If so, what were the results?

Minor nit: Did you copy-paste things verbatim? You mention "sys_sun12:~> remsh `hostname` uname -a", but as far as I know the Solaris command is rsh, not remsh. Or has that changed?