Search in sources :

Example 1 with SshjSftpSession

use of com.jn.agileway.ssh.client.impl.sshj.sftp.SshjSftpSession in project agileway by fangjinuo.

the class SshjConnection method openSftpSession.

@Override
public SftpSession openSftpSession() throws SshException {
    try {
        SFTPClient client = sshClient.newSFTPClient();
        SshjSftpSession session = new SshjSftpSession(client);
        session.setSshConnection(this);
        return session;
    } catch (Throwable ex) {
        throw new SshException(ex);
    }
}
Also used : SshjSftpSession(com.jn.agileway.ssh.client.impl.sshj.sftp.SshjSftpSession) SFTPClient(net.schmizz.sshj.sftp.SFTPClient) SshException(com.jn.agileway.ssh.client.SshException)

Aggregations

SshException (com.jn.agileway.ssh.client.SshException)1 SshjSftpSession (com.jn.agileway.ssh.client.impl.sshj.sftp.SshjSftpSession)1 SFTPClient (net.schmizz.sshj.sftp.SFTPClient)1