how to check whether the ssh tunnel is up

Vincent Lin vintobe at gmail.com
Fri May 17 16:30:41 EST 2013


Hi Gert,

But SSH knows. I have added some code in the openssh client part. If the
remote socket is ready, the ssh server will send the result to the ssh
client. Once the client receives the result, I can write to a file. And
other process can read the status from the file.

Thanks
Vincent


On Thu, May 16, 2013 at 4:21 PM, Gert Doering <gert at greenie.muc.de> wrote:

> Hi,
>
> On Thu, May 16, 2013 at 04:15:07PM +0800, Vincent Lin wrote:
> > 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.
>
> You actually can't know whether the remote socket is ready for *you*
> without checking the full path back to you - some other user on the
> remote machine might already have opened the specific remote forwarding
> port before...
>
> gert
> --
> USENET is *not* the non-clickable part of WWW!
>                                                            //
> www.muc.de/~gert/
> Gert Doering - Munich, Germany
> gert at greenie.muc.de
> fax: +49-89-35655025
> gert at net.informatik.tu-muenchen.de
>


More information about the openssh-unix-dev mailing list