how to check whether the ssh tunnel is up

Alex Bligh alex at alex.org.uk
Thu May 16 02:21:32 EST 2013


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