0

There are 3 UNIX boxes:

  • Client
  • Bounce Box
  • Remote

The REMOTE machine only allows SSH connections from the bounce box. On the BOUNCE box I have the following in the local SSH config file:

Host REMOTE
  HostName remote.domains.tld
  ControlPath ~/.ssh/master-r@%h
  ControlMaster auto
  ControlPersist 4h
  ForwardAgent yes
  IdentityFile ~/.ssh/id_rsa

The above allows me to reuse a single connection so I do not have to log in each time I need another console, etc...

Without using SSH tunneling (ie. ssh -L 22:REMOTE:22 user@BOUNCE), I would like to be able to connect from CLIENT to REMOTE and re-use the already open connection on BOUNCE so that I do not need to re-authenticate each time I want to open a new console.

It such a thing possible?

0

You may be able to achieve what you're trying to do by also using a re-usable connection between CLIENT and BOUNCE, along with the ProxyCommand directive.

In the ~/.ssh/config file on CLIENT:

Host REMOTE
  HostName remote.domains.tld
  ProxyCommand ssh BOUNCE -W %h:%p
  ControlPath ~/.ssh/master-%r@%h:%p
  ControlMaster auto
  ControlPersist 4h
  • When I tried this it prompted me to authenticate, which means it didn't reuse the already open connection on BOUNCE. – Tuaris Mar 21 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.