TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:16130] keepalive in ssh?
So does SSH and it's turned on by default and still doesn't help.
Paul Wiechman <pwiechman@talkware.net> writes:
> OpenSSH has a keep-alive option in its configs.
>
> Paul Wiechman
>
> Jon Schewe wrote:
>
> > I've discovered that with port forwarding over ssh I can get access to the
> > internal web at my work, however I'm trying to figure out how to keep the
> > connection open. ssh seems to want to time out every now and then and I want
> > to be able to restart it, but when I do from cron, things tend to get lost.
> > Like the connection is there, but when I send traffic over it nothing comes
> > back. It only seems to work if I start it from a prompt, ie. not inside
> > cron. Here's the shell script I'm running from cron, with names changed to
> > protect the innocent :)
> >
> > #! /bin/bash
> >
> > check=`/bin/ps awx | grep ssh | grep '3128:proxy:3128'`
> > if [ -z "${check}" ]; then
> > /usr/bin/ssh -q -C -f -g -L 3128:proxy:3128 -l username host.company.com 'while `/bin/true`; do sleep 5; done;'
> > #echo "Needs restart"
> > #else
> > # echo "still running"
> > fi
> >
> > Anyone got any ideas?
> >
> > --
> > Jon Schewe
> > http://eggplant.mtu.net/~jpschewe
> > schewe@tcfreenet.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> > For additional commands, e-mail: tclug-list-help@mn-linux.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
--
Jon Schewe
http://eggplant.mtu.net/~jpschewe
schewe@tcfreenet.org