How to SSH to a server behind another SSH server using JSch?
问题 I need to be able to ssh from a Java program into a remote server, and from there SSH to another server. I have credentials for both servers on my client. The commands will be passed automatically from within the app as regular strings (no user input). I need to be able to run those custom commands on the second server and be able to decide what commands to issue during runtime, based on the output and some simple logic. Can I use JSch to do that and if yes, where should I start look into?