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.