Search in sources :

Example 1 with Ssh2SftpSession

use of com.jn.agileway.ssh.client.impl.trileadssh2.sftp.Ssh2SftpSession in project agileway by fangjinuo.

the class Ssh2Connection method openSftpSession.

@Override
public SftpSession openSftpSession() throws SshException {
    try {
        SFTPv3Client sftpClient = new SFTPv3Client(this.delegate);
        Ssh2SftpSession session = new Ssh2SftpSession(sftpClient);
        session.setSshConnection(this);
        return session;
    } catch (Throwable ex) {
        throw new SshException(ex.getMessage(), ex);
    }
}
Also used : Ssh2SftpSession(com.jn.agileway.ssh.client.impl.ganymedssh2.sftp.Ssh2SftpSession) SFTPv3Client(ch.ethz.ssh2.SFTPv3Client) SshException(com.jn.agileway.ssh.client.SshException)

Example 2 with Ssh2SftpSession

use of com.jn.agileway.ssh.client.impl.trileadssh2.sftp.Ssh2SftpSession in project agileway by fangjinuo.

the class Ssh2Connection method openSftpSession.

@Override
public SftpSession openSftpSession() throws SshException {
    try {
        SFTPv3Client sftpClient = new SFTPv3Client(this.delegate);
        Ssh2SftpSession session = new Ssh2SftpSession(sftpClient);
        session.setSshConnection(this);
        return session;
    } catch (Throwable ex) {
        throw new SshException(ex.getMessage(), ex);
    }
}
Also used : Ssh2SftpSession(com.jn.agileway.ssh.client.impl.trileadssh2.sftp.Ssh2SftpSession) SFTPv3Client(com.trilead.ssh2.SFTPv3Client) SshException(com.jn.agileway.ssh.client.SshException)

Aggregations

SshException (com.jn.agileway.ssh.client.SshException)2 SFTPv3Client (ch.ethz.ssh2.SFTPv3Client)1 Ssh2SftpSession (com.jn.agileway.ssh.client.impl.ganymedssh2.sftp.Ssh2SftpSession)1 Ssh2SftpSession (com.jn.agileway.ssh.client.impl.trileadssh2.sftp.Ssh2SftpSession)1 SFTPv3Client (com.trilead.ssh2.SFTPv3Client)1