Back to Codinn

Allow a connection to be made without forwarding ports

(David Olrik) #1

I use connection sharing aggressively and would like to be able to connect automatically to a jumphost without having to forward anything to the jumpstation.

Best regards,
David Jack Wange Olrik

(Yang.Y) #2

Actually you do not have to create tunnel for the bastion host, just set “Proxy Jump” option and everything is done:

(David Olrik) #3

I’m using the jump host for ssh connections in the terminal and want to avoid the jump host connection being tied to the first ssh command.

In essence I just want the connection to be ready for use and reuse.

Best regards,
David Jack Wange Olrik

(Yang.Y) #4

David, could you please give an example that shows how this can be done in command line terminal? I’m not quite understand your workflow.

(David Olrik) #5

It’s just plain ssh commands, but with ControlMaster options configured so the connection is reused.

I start by connecting to the bastion host, and then just use plain ssh commands in the terminal which will go through the bastion host automatically. - And by not tying any “jumps” to the bastion host connection it will not hang when the connection is terminated.

My workflow is as follows:

  • At the beginning of the day, connect to the bastion host in Core Tunnel
  • Open a terminal, issue normal ssh command which uses the bastion host

If you have ControlMaster configured, and you connect to host A through bastion host B, and then connect to host C through the same bastion host B, you’ll run into trouble when disconnecting from host A.
The terminal will hang, and if you break out of the hang, you will also terminate the connection to host C.

(Yang.Y) #6

Thank you for the explanation, I think I got you points.

Actually you want to create a “Master” connection in Core Tunnel, and then all other tunnel or terminal connections can be established over the Master connection.

So there is no necessary to force the Master tunnel contains a port forwarding for this case.

Please correct me if I misunderstood you.

(David Olrik) #7

How do I create a “Master” connection? - I can’t find any option or switch to do this.

Also note that I want to have more than one “Master” connection.

(Yang.Y) #8

That’s the problem, there is no “Master” tunnel for this moment :frowning:

I’ll add this in list, and try find a proper way to allow Core Tunnel create a pure “Master” tunnel.

(David Olrik) #9

I’ll just add a socks proxy forward for now.