channel.setCommand(command);
channel.setInputStream(null);
((ChannelExec)channel).setErrStream(errorStream);
InputStream in=channel.getInputStream();
// connect actually execs the process on a remote node
channel.connect();
// synchronously consume the stdout. If no stdout is available
// this method exits.
consumeProcessStream(host, in, outputStream, channel);
channel.disconnect();
if ( channel.getExitStatus() != 0 || errorStream.size() > 0 ) {