Hi,
I want to run some commands by jsch.
commands like this:
"ls;error command;dir;"
IF the commands include one error command.
how can the other commands run continue?
how can I config the jsch?
 IF I want to the other commands terminal, how can I config the jsch? 
My code like this:
public static String sshExecute(String host, String user, String pwd,
            String command) {
        System.getProperty("os.name");
        StringBuffer sb = new StringBuffer();
        try {
            JSch jsch = new JSch();
            Session session = jsch.getSession(user, host, 22);
            session.setPassword(pwd);
            java.util.Properties config = new java.util.Properties();
            config.put("StrictHostKeyChecking", "no");
            session.setConfig(config);
            session.connect();
            ChannelExec channel = (ChannelExec) session.openChannel("exec");
            channel.setCommand(command);
            InputStream in = channel.getInputStream();
            channel.connect();
            int nextChar;
            while (true) {
                while ((nextChar = in.read()) != -1) {
                    sb.append((char) nextChar);
                }
                if (channel.isClosed()) {
                    System.out.println("exit-status: "
                            + channel.getExitStatus());
                    break;
                }
                try {
                    // Thread.sleep(1000);
                }
                catch (Exception ee) {
                }
            }
            channel.disconnect();
            session.disconnect();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        return sb.toString();
    }