List of usage examples for org.apache.commons.net.ssh SSHClient useCompression
@SuppressWarnings("unchecked") public void useCompression() throws TransportException
From source file:examples.ssh.SCPUpload.java
public static void main(String[] args) throws Exception { SSHClient ssh = new SSHClient(); ssh.loadKnownHosts();/*from ww w . j av a 2 s. c o m*/ ssh.connect("localhost"); try { ssh.authPublickey(System.getProperty("user.name")); // Compression = significant speedup for large file transfers on fast links // present here to demo algorithm renegotiation - could have just put this before connect() ssh.useCompression(); ssh.newSCPFileTransfer().upload("/Users/shikhar/well", "/tmp/"); } finally { ssh.disconnect(); } }