how to check whether the ssh tunnel is up

Daniel Kahn Gillmor dkg at
Sun Apr 28 01:48:25 EST 2013

On 04/27/2013 07:47 PM, Vincent Lin wrote:

> Is it the only way to check the tunnel on the remote server side? How about
> on the local client side?

the tunnel you're specifying is:

 ssh [...] -R 20001:localhost:22

this means that sshd (on the remote machine) will listen on remote port
20001.  if a request comes in, then sshd will call across the
established ssh connection to ask ssh (on the local machine) to create a
connection to localhost:22.  I don't see a way to examine this situation
from the client side, since the local side hasn't done anything yet.
But maybe i'm missing something, and someone more knowledgable might be
able to suggest an approach i'm missing. (e.g. see the autossh idea
mentioned elsewhere in this thread)



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1027 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the openssh-unix-dev mailing list