* @throws SshException
*/
public SftpSubsystemClient openSftpChannel(
ChannelEventListener eventListener) throws IOException {
SessionChannelClient session = openSessionChannel(eventListener);
SftpSubsystemClient sftp = new SftpSubsystemClient();
if (!openChannel(sftp)) {
throw new SshException("The SFTP subsystem failed to start");
}
// Initialize SFTP
if (!sftp.initialize()) {
throw new SshException(
"The SFTP Subsystem could not be initialized");
}
return sftp;