0

I am trying to use sshj to tunnel through an gateway (jump point) server:

A -> B -> C

The caveat is that I need to do this without setting up a local port forward. I need to make a direct connection to server B, then make another ssh connection to server C.

Scott
  • 16,711
  • 14
  • 75
  • 120

1 Answers1

0

I wasn't able to find a solution that didn't utilize local port forwarding. A potential non port forward solution could be to get a PTY from the first connection, then just execute ssh; but, in initial testing the new session did not seem to transfer over for me.

The best solution I found for this tunneling requirement was found in a piece of code here in the overthere project.

UPDATE: I answered a similar question with some code here: https://stackoverflow.com/a/16023513/311525

Community
  • 1
  • 1
Scott
  • 16,711
  • 14
  • 75
  • 120