login about faq

I can easily create a tunnel using the terminal client like so:

$ sshg3 -L 8080:myserver:80

This will forward traffic from my local host on port 8080 to port 80 on myserver, however it requires that I leave this terminal connection open for the duration of the tunnel.

How can I have this tunnel created without having to always open a terminal connection?

asked Oct 07 '09 at 21:07

SSH%20KB's gravatar image


edited Oct 13 '09 at 10:34

Sami%20Lehtinen's gravatar image

Sami Lehtinen

One way to do this is by using static tunnels in Tectia Connection Broker.

Edit (or create) your broker configuration:


You'll need to create a profile for the server that the tunnel will use:

<profile  id="id1" 
         host="myserver" />

Next you'll need to define a static tunnel specifying your tunnel parameters (the same values given on the command line above):

 <tunnel type="TCP"

And finally start the connection broker:

$ ssh-broker-g3

Now (as long as ssh-broker-g3 is running) when connecting, for example with a browser, to local port 8080 the tunnel will be opened to port 80 on host myserver without the need to start a separate terminal connection.

Since the application using the tunnel cannot provide the password for the SSH connection you'll also want to setup a non-interactive authentication method such as public key and unlock the key after starting the connection broker. See the command:

$ ssh-broker-ctl key-passphrase --help

Or alternatively use an empty-passphrase public key.


answered Oct 07 '09 at 21:24

Roman's gravatar image

Roman ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 07 '09 at 21:07

Seen: 8,255 times

Last updated: Oct 13 '09 at 10:34

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.