jsch icon indicating copy to clipboard operation
jsch copied to clipboard

Missing Jumphost.java in the examples directory

Open Tilden18 opened this issue 2 years ago • 4 comments

In the Readme states the below

  • JumpHosts.java This program will demonstrate SSH through jump hosts.

but the JumpHosts.java file is missing in the examples directory. c

Tilden18 avatar Sep 02 '22 18:09 Tilden18

I'm guessing this is it?

http://www.jcraft.com/jsch/examples/JumpHosts.java

norrisjeremy avatar Sep 02 '22 19:09 norrisjeremy

Hi @Tilden18,

FYI, I pulled the copy of this from the original author's site I noted above and have included it in PR #200.

Btw, this code seems to just use port-forwarding, so I don't believe operates in the same manner as OpenSSH's ProxyJump functionality (which I believe accomplishes jump host type functionality without using port-forwarding), if that is what you are looking for.

Thanks, Jeremy

norrisjeremy avatar Sep 02 '22 19:09 norrisjeremy

Hi Jeremy, yes, I was looking for ProxyJump functionality (with Password and Key authorization). do you support this in jsch?

Similar to this. https://github.com/hierynomus/sshj/blob/master/examples/src/main/java/net/schmizz/sshj/examples/Jump.java

Tilden18 avatar Sep 05 '22 08:09 Tilden18

Hi @Tilden18,

JSch doesn't currently support the ProxyJump specific directive as implemented in OpenSSH. However, it should be possibly to perform something akin to it using port forwarding (as the JumpHosts.java example implements). Also, from my limited understanding of SSHJ, the example you linked from it appears to be similar to the JumpHosts.java example, in that it utilizes port forwarding.

Thanks, Jeremy

norrisjeremy avatar Sep 06 '22 15:09 norrisjeremy