yet another ssh question

tony.chamberlain at lemko.com tony.chamberlain at lemko.com
Sun Mar 9 02:16:42 UTC 2008


The thing is I did try the -f and it was the same problem.
Maybe you just can't have it run in the background.
I also made a thing on the remote host I called "sleepy"

while :
do
sleep 500
done


and then I did the ssh -l <blah blah blah> $OUTSIDEIP sleepy

to make sure it would run something and not log me off.
Same problem, AND when I killed the task, sleepy kept 
running on the remote machine.




He's probably better off with -f and no ampersand, because that will 1)
attach stdin from /dev/null like -n does and 2) fork off into the
background only _after_ the ssh connection is up. Without that
synchronisation (plain "&" approach) his script may start the other
tunneled ssh commands before the ssh tunnel itself is up. And it has the
bonus that you can test if the tunnel came up:

 if ssh -f .....
 then
 tunnel-using-ssh-commands-here...
 else
 whoops, main ssh failed for some reason
 fi

Cheers,
-- 

-ling listfedora-list at redhat.comhttps://www.redhat.com/mailman/listinfo/fedora-listEnd of fedora-list Digest, Vol 49, Issue 51*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080309/e88baf7f/attachment-0001.htm>


More information about the fedora-list mailing list