Re: adding tunnels to existing connection

From: Jacob Nevins (jacobn_at_chiark.greenend.org.uk)
Date: 07/30/04


Date: 30 Jul 2004 11:53:42 +0100 (BST)

Tobias Wagner <none@rz.uni-karlsruhe.de> writes:
>Is there a way to open the tunnels only on demand and share one ssh
>process? So before opening a new tunnel, it is checked if a connection
>to the target already exists, and if so, the tunnel is added to the
>existing connection.

If you can persuade the clients apps to use SOCKS, then OpenSSH's -D
option may do what you want:

  -D port
          Specifies a local ``dynamic'' application-level port forwarding.
          This works by allocating a socket to listen to port on the local
          side, and whenever a connection is made to this port, the connec-
          tion is forwarded over the secure channel, and the application
          protocol is then used to determine where to connect to from the
          remote machine. Currently the SOCKS4 protocol is supported, and
          ssh will act as a SOCKS4 server. Only root can forward privi-
          leged ports. Dynamic port forwardings can also be specified in
          the configuration file.



Relevant Pages

  • Re: What is The SSH?
    ... Building and Using SSH Tunnels ... What is an SSH tunnel? ... how to use it to make a connection to a server. ... You will need a working SSH client and server installation to build and test ...
    (microsoft.public.windows.server.networking)
  • SSH TCP forwarding: works with v1, not with v2 ssh
    ... that they're setting up the tunnels with no problem, ... I can get to the work ssh daemon: ... debug1: Connections to remote port 65002 forwarded to local address palimpsest:22 ... something answers (if I get "connection refused" there's no listener); ...
    (FreeBSD-Security)
  • Re: SSH TCP forwarding: works with v1, not with v2 ssh
    ... >that they're setting up the tunnels with no problem, ... >I can get to the work ssh daemon: ... > debug1: Entering interactive session. ... > Connection closed by foreign host. ...
    (FreeBSD-Security)
  • Re: sftp over two connections
    ... from there I log onto LIN and I can work on the console. ... > X tunneling works as well, and I tunnel additional ports to control ... > connection be tunneled through SSH so that I could mount LIN's ...
    (comp.security.ssh)
  • Re: PPP VPN solution over ssh tunnel?
    ... I run an ssh tunnel home from work all day long. ... I could run a traditional VPN connection ... but it worked for some things socks proxy did not. ...
    (comp.os.linux.networking)