JSch reads the input and error streams eagerly when they
are returned from the Channel. As a result the Scanner of the
error stream could be already trying to read from a Stream in EOF,
which unfortunately was leading to a deadlock because of a bad
implementation in the JSch code using PipedInputStream.
Consume the error stream immediately and get the data out
before reaching EOF, so that the deadlock can be avoided.
Change-Id: I60b6e5156ec9f649fbe3b7581cde974c8c233fbc