1

I'm working from behind a firewall, and currently can connect to certain servers/db by using SSH Tunneling through the cmd/putty.

I want to automatize this process through java code. I looked into the JSch library, but I am a little confused about how to manage the kind of connection I want to do.

which is:

ssh -t -L 10009:localhost:10009 user1@bastionHost ssh -t -L 10009:localhost:10009 user2@proxyHost ssh -L 10009:targetHost:10009 user3@jumpHost

Any help would be appreciated. :)

  • I think you'll find everything you need by checking [the library's samples](http://www.jcraft.com/jsch/examples/), especially the PortForwardingL.java and JumpHosts.java – Aaron Dec 13 '19 at 10:37

0 Answers0