Java JSch在SSH Unix上运行shell命令,使通道退出状态为-1

时间:2019-06-25 04:47:55

标签: java jsch

            Channel channel=session.openChannel("exec");
            ((ChannelExec)channel).setCommand(command1);
            channel.setInputStream(null);
            InputStream in=channel.getInputStream();
            final InputStream errStream = ((ChannelExec)                                                 
             channel).getErrStream();
            channel.connect();

获取通道退出状态为-1

0 个答案:

没有答案