tags:

views:

191

answers:

0

Hi,

I am using sshtools' SftpClient to download some fairly large files. I have found that when files are over 1 GB in size, the get method hangs. Specifically, I when I execute the following code for files over 1 GB, it hangs at the get method. Any ideas?

SshClient ssh = new SshClient();
ssh.setSocketTimeout(30000);
ssh.connect(host);
//Authenticate
PasswordAuthenticationClient passwordAuthenticationClient = PasswordAuthenticationClient();
passwordAuthenticationClient.setUsername(user);
passwordAuthenticationClient.setPassword(pass);
int result = ssh.authenticate(passwordAuthenticationClient);

//Open the SFTP channel
SftpClient client = ssh.openSftpClient();
client.get(remoteFile, localFile);
client.quit();
ssh.disconnect();