JSch Exec output for error
问题 I need to run shell script at a remote machine. I am using JSch to connect to the remote machine and executing the shell script using ChannelExec . I need to know how I can get to know, if there was any error while execution of the command. Following is my code ChannelExec channel = (ChannelExec) session.openChannel("exec"); BufferedReader in = new BufferedReader(new InputStreamReader(channel.getInputStream())); String command = scriptName; if(parameter != null && !parameter.isEmpty()){