This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
JSch is a pure Java implementation of SSH2.
>what is InputStream in = ch.getInputStream(); doing in this code???
At a guess it would be getting an input stream from the channel so that you can send input/commands to the remote ssh session you have connected to.
I don't know what you are trying to accomplish, but I am 100% certain that nothing related to this code belongs in a JSP.