Archive for April, 2017

Creating a SSH Tunnel in Java

Sunday, April 9th, 2017

How to create a SSH tunnel in a Java app from a localhost port through a jump box to a specific port on a server. Allowing a connection to the remote server port as if it was a localhost port.

Examples found online provided only one ‘hop’, not the double ‘hop’ needed. The code below supports 2 hops, but in theory could be used to support any number of hops.

(more…)