> For instance for mysql, I'm starting ssh on my side like this:
> 
> ssh -n -S +C -l remote-user -L 3316:customer-intranet-ip:3316 customer1
> 
> I don't want a session channel (hence the -S) because I don't want my
> users to mess with customer's machine other than using the tunneled mysql
> connection.
> 
> As soon as the connection is established, I get this:
> 
> warning: ssh2[22120]: number of forwarded channels still open, forked to
> background to wait for completion.
> 
> However, I don't get it every time. Sometimes the message appears when the
> connection is terminated.
> 
> I don't care about the message, I just want the tunnel to stay open
> until ssh is terminated so that multiple simultaneous or consecutive
> HTTP requests can be handled over it.
> 
> Any ideas anyone? I'm running ssh 2.1.0 on Tru64 4.0f. The server has ssh
> 2.0 on Solaris 2.6.

The tunnel *will* close when the last connection closes. If you want to keep
it open, you *have* to have a connection extablished which *you* control to
make sure it stays open until that connection dies. You could use a control
connection, but make sure it executes a harmless command which just waits on
the server machine. You could arrange to forward a different connection which
you keep open instead of using the control connection. But you need one or
the other; unless you want to patch the code...

-- 
        David Pick

Reply via email to