[lug] 3 Questions: 1) Port Forwarding 2) Unison 3) Job Management Software 4) Test Apache

Daniel Webb lists at danielwebb.us
Mon Feb 14 18:46:51 MST 2005


On Mon, Feb 14, 2005 at 12:43:57PM -0700, David Morris wrote:

> Don't have the address or email, but doing this is just a
> simple loop in a shell script.  Here is an example in the
> Z-Shell which makes a proxy server running behind a firewall
> available on a remote machine.  This is run from the system
> running the proxy server but could be run on the other
> system by changing "-R" to "-L".
> 
>     while true
>     do
>     echo ">>> Connecting <<<"
>     ssh -R 3128:localhost:3128 -c blowfish -g  \
>         user at host.com ping -i 5 localhost
>     sleep 2
>     end

It's actually much tougher than that.  Under bad conditions (like
sketchy wireless connections), ssh will lose the connection without
quitting.  I have also seen ssh hang on both the sshd side and the ssh
side when using -R port forwarding.  autossh deals with this by
continually testing the connection, and restarting it when needed.  The
only problem with this is that sshd hangs on the remote side too, and
autossh can't do anything about that.



More information about the LUG mailing list