JAVA-26728 | update sshj lib (#15144)
* JAVA-26728 | update sshj lib * JAVA-26728 | added compression
This commit is contained in:
parent
8fff0f323c
commit
3f850f7d00
|
@ -56,7 +56,7 @@
|
|||
<properties>
|
||||
<!-- sftp -->
|
||||
<jsch.version>0.1.55</jsch.version>
|
||||
<sshj.version>0.27.0</sshj.version>
|
||||
<sshj.version>0.37.0</sshj.version>
|
||||
<vfs.version>2.4</vfs.version>
|
||||
<zip4j.version>2.9.0</zip4j.version>
|
||||
<opencsv.version>5.8</opencsv.version>
|
||||
|
|
|
@ -20,14 +20,14 @@ import net.schmizz.sshj.transport.verification.PromiscuousVerifier;
|
|||
|
||||
public class SftpFileTransferLiveTest {
|
||||
|
||||
private String remoteHost = "HOST_NAME_HERE";
|
||||
private String username = "USERNAME_HERE";
|
||||
private String password = "PASSWORD_HERE";
|
||||
private String localFile = "src/main/resources/input.txt";
|
||||
private String remoteFile = "welcome.txt";
|
||||
private String localDir = "src/main/resources/";
|
||||
private String remoteDir = "remote_sftp_test/";
|
||||
private String knownHostsFileLoc = "/Users/USERNAME/known_hosts_sample";
|
||||
private final String remoteHost = "HOST_NAME_HERE";
|
||||
private final String username = "USERNAME_HERE";
|
||||
private final String password = "PASSWORD_HERE";
|
||||
private final String localFile = "src/main/resources/input.txt";
|
||||
private final String remoteFile = "welcome.txt";
|
||||
private final String localDir = "src/main/resources/";
|
||||
private final String remoteDir = "remote_sftp_test/";
|
||||
private final String knownHostsFileLoc = "/Users/USERNAME/known_hosts_sample";
|
||||
|
||||
@Test
|
||||
public void whenUploadFileUsingJsch_thenSuccess() throws JSchException, SftpException {
|
||||
|
@ -100,6 +100,7 @@ public class SftpFileTransferLiveTest {
|
|||
client.addHostKeyVerifier(new PromiscuousVerifier());
|
||||
client.connect(remoteHost);
|
||||
client.authPassword(username, password);
|
||||
client.useCompression();
|
||||
return client;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue