Operating System - HP-UX
1825775 Members
2263 Online
109687 Solutions
New Discussion

Remsh hangs in shell script

 
Yan Wong
Frequent Advisor

Remsh hangs in shell script

Hi folks,

I wrote a Perl script in HP UX server with 11.0. This script executes the command of userdel on other remote HP UX servers. They are all in 11.0.

The remsh command below hangs all the time till pressing Ctl-C to terminate it.

$chk_host=`remsh $host grep '^$unix_login:' /etc/passwd`;

The other remote host does not has this problem. I ran this command on the shell and it works just fine in a sec. Not sure why it takes so long in the Perl script in one particular remote.

Could anyone shed some light?

Thanks.
Yan
3 REPLIES 3
Charles Harris
Super Advisor

Re: Remsh hangs in shell script

Just a thought, but try redirecting stdin from null.....

hein coulier
Frequent Advisor

Re: Remsh hangs in shell script

try "remsh -n"
Bart Paulusse
Respected Contributor

Re: Remsh hangs in shell script

remsh $host -n command
will make sure the remsh command will NOT wait for keyboard input.
Had the same problem once where on on server the remsh went fine and on another one it waited forever.
The -n option solved my problem.
I didn't investigate why it needed the -n on one server and not on the other....

regards,

Bart