SSH Reverse SSH Tunnel with Java AKN

Is it possible to make a reverse ssh connection using AOH? If this is not the case, is there any other pure Java library that I can use to create a reverse SSH tunnel connection?

The command I want to play is similar to the command:

ssh -fN -R 7000:localhost:22 username@yourMachine-ipaddress

+2
source share
1 answer

There is a gist example that shows how to do this here: https://gist.github.com/ymnk/2318108#file-portforwardingr-java

The method you want to look at is session.setPortForwardingR ()

session.setPortForwardingR(rport, lhost, lport);
+2
source

All Articles