Knowledgebase
Using a specific SFTP cipher
Posted by Mohammad Jawwad on 30 April 2010 11:51 PM
Sometimes there is a need to use a specific encryption cipher due to reasons of efficiency, business needs or availability. Use the following code to accomplish this :

SftpConfiguration config = new SftpConfiguration();
AlgorithmFactory fact = new AlgorithmFactory();
fact.setPrefferedCipher("blowfish-cbc");
config.getSshConfiguration().getTransportConfiguration().setAlgorithmFactory(fact);
SshParameters params = new SshParameters("[host]", "[user]", "[pass]");
Sftp s = new Sftp(params, config);
s.setDebug(true);
s.connect();
s.disconnect();

The above code uses blowfish-cbc as the preferred cipher.
(91 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako fusion