Hi all,

I want to invoke a shell script on remote Linux machine using JSch without waiting for the STDOUT/STDERR from the shell. I have modified the code available in JSch official website in the following manner-

        String command = "sh /opt/scripts/start.sh";
        JSch jsch = new JSch();
        Session session = jsch.getSession(user, host, 22);
        UserInfo ui = new MyUserInfo();
        session.setUserInfo(ui);
        session.connect();

        Channel channel = session.openChannel("exec");
        ((ChannelExec) channel).setCommand(command);

        channel.setInputStream(null);
        channel.setOutputStream(null);
        channel.connect();
        channel.disconnect();
        session.disconnect();


The above code works perfectly. But can i get the status of invoke signal? I mean is there any way so that I can get that whether shell script is invoked successfully or not? Also I don't want to wait for its execution and STDOUT/STDERR.
 
-Ravi Joshi