How to ssh multiple times by JSch: port forwarding, ssh command or SSH tunnel?
<p>By terminal I am able to SSH multiple times to connect to the server:</p>

<p>(client--->gateway--->server1---->server2---)</p>

<p>But now to do it through JSch library of Java, how to go about it?
First tried portforwarding, but on terminal I am not doing that (not setting <code>-R -L</code> parameters in <code>ssh</code>).</p>

<p>Then I came across question <a href="https://stackoverflow.com/q/6770019/850848">How to SSH to a server behind another SSH server using JSch?</a>, but I don't understand how to create tcp tunnel!</p>