Thomas Leitner writes:
: 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.
As of ssh-2.1.0, the behaviour of the "-f" parameter (fork to
background) was changed so that if forwards are specified, it will
handle them indefinitely. So, you could do the above like this:
% ssh -f +C -l remote-user -L 3316:customer-intranet-ip:3316 customer1
The'-n' and '-S' are implied with '-f'. This should do what you want.
Note: after this, you have to kill the ssh2 process yourself using its
pid (use ps -ef | grep ssh2 or something).
--
[[EMAIL PROTECTED] -- Sami J. Lehtinen -- [EMAIL PROTECTED]]
[work:+358 9 85657425][gsm:+358 50 5170 258][http://www.iki.fi/~sjl]
[SSH Communications Security Corp http://www.ssh.com/]