Operating System - HP-UX
1753830 Members
9467 Online
108806 Solutions
New Discussion юеВ

remsh hangs up when running in background and window locks

 
Dave Ferkinhoff
New Member

remsh hangs up when running in background and window locks

We use remsh with .rhosts to execute processes distributed across platforms. If the originating script is started in the background the remshell sessions hang when the screen saver comes up. We are using HP-UX 11.00 on J282 workstations. Any suggestions on what to look for?
4 REPLIES 4
TwoProc
Honored Contributor

Re: remsh hangs up when running in background and window locks

To stop that problem: use ssh.

To have a safer and more secure system - use ssh. - And stop using remsh with .rhosts files.

Here's a place to get it:

http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/openssh-4.3p2/
We are the people our parents warned us about --Jimmy Buffett
Greg Vaidman
Respected Contributor

Re: remsh hangs up when running in background and window locks

If you initiate any background tasks in a remsh session, the session doesn't close until the background task finishes, UNLESS you redirect the STDIN, STDOUT & STDERR for the background task.

For example, any command run in the background in a remsh should look something like:
command < /dev/null > file.log 2> file.err &
or
command < /dev/null > /dev/null 2>&1 &
Victor Fridyev
Honored Contributor

Re: remsh hangs up when running in background and window locks

Hi,

Do you use -n parameter in remsh ?

SYNOPSIS
remsh host [-l username] [-n] command

Usually this helps.

BTW, I agree re ssh, it's more secure, but you have to install a version without bugs, which is difficult 8))))

HTH
Entities are not to be multiplied beyond necessity - RTFM
Dave Ferkinhoff
New Member

Re: remsh hangs up when running in background and window locks

Thanks! I'll try the -n. I agree ssh is more secure, but we can't make the switch for that build product at this time for variious reasons.