Re: yet another ssh question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 list fedora-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-list End of fedora-list Digest, Vol 49, Issue 51 *******************************************

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux