//configure two piped i/o stream pairs, to connect to the input/output of the SSH connection
final PipedInputStream responderInput = new PipedInputStream();
final PipedOutputStream responderOutput = new PipedOutputStream();
final PipedInputStream jschInput = new PipedInputStream();
//lead pipe allows connected inputstream to close and not hang the writer to this stream
final PipedOutputStream jschOutput = new LeadPipeOutputStream();
try {
responderInput.connect(jschOutput);
jschInput.connect(responderOutput);
} catch (IOException e) {
return NodeExecutorResultImpl.createFailure(StepFailureReason.IOFailure, e.getMessage(), node);