Initialize an Output stream for both to write to, then instead of getInputStream, use setOutputSteam and setErrStream
OutputStream out = new OutputStream();
channel.setOutputStream(out);
channel.setErrStream(out);
Note that 'out' will be closed when the channel disconnects. To prevent that behavior, add a boolean when setting the output stream:
channel.setErrStream(out, true);
channel.setOutputSteam(out, true);
This may be important if the output stream you are using for the JSCH ChannelExec session is being reused elsewhere in your code.
If you need to read the output stream into an input stream, refer to this question.