how to check whether the ssh tunnel is up

Vincent Lin vintobe at gmail.com
Thu May 16 18:15:07 EST 2013


Alex,

OK, I got it, all I want is to know the remote socket is ready so that the
server side can wirte data. I will leave the rest part to the server side.
I don't care whether the ssh tunnel is successful or not. And I can't know
that. The server side should take care of that tunnel.

Thanks
Vincent


On Thu, May 16, 2013 at 12:21 AM, Alex Bligh <alex at alex.org.uk> wrote:

> Vincent,
>
> On 15 May 2013, at 15:30, Vincent Lin wrote:
>
> > Is that mean the only way to
> > find tunnel status is to send data from server side and look forward to
> > receiving the reply just like autossh?
>
> My conclusion when I last looked at this was that the only way to reliably
> tell whether an ssh tunnel up is to send data through it in both
> directions.
> Using the trick autossh uses (whether you actually use autossh or not) of
> paired -L and -R seems like the easiest way to do this. I was going to code
> this myself and found using autossh was far easier.
>
> --
> Alex Bligh
>
>
>
>
>


More information about the openssh-unix-dev mailing list