Removing shell stuff (like prompts) from command output in JSch
I have successfully SSH'ed into a node, sent the input, and retrieved the output. After inputting a line, the line is printed to the console, followed by a blank line, and then the output prints twice. I don't want the input to print to the console after it is entered, nor the blank line, nor the output printed a second time. Below is the code I have public void runSession() { try { Channel channel = session.openChannel("shell"); channel.setInputStream(System.in, true); channel.setOutputStream(System.out, true); channel.connect(defaultChannelTimeout); while (channel.getExitStatus() == -1) {