1

Can you please indicate how can I enable SHA 256 encryption during SFTP connectivity. Currently I am using below code to connect to SFTP. Thanks in advance for your help.

        SSHFTPClient ftp = new SSHFTPClient();
        ftp.setRemoteHost("hostname");
        ftp.setRemotePort(23);
        ftp.setAuthentication("username", "password");
        ftp.getValidator().setHostValidationEnabled(false);
        ftp.connect();
Irish
  • 11
  • 1

1 Answers1

0

Try:

ftp.setAlgorithmEnabled(SSHFTPAlgorithm.MAC_SHA2_256, true);

See here for an example.

HansA
  • 1,375
  • 2
  • 11
  • 19