try {
channel = getExecChannel();
channel.setCommand(cmd);
fileInfo = receiveStream(channel, remoteFile, null);
channel.disconnect();
} catch (JSchException e) {
throw (IOException) new IOException("Error during SCP transfer." + e.getMessage())
.initCause(e);
} finally {
if (channel != null) {