0

I have a problem while uploading a file using SFTP outbound connector with Identity file and passphrase. Below is my sftp outbound component with identity file and passphrase code snippet.

<sftp:outbound-endpoint exchange-pattern="request-response"
        connector-ref="SFTP" outputPattern="testsftp.txt" host="XXX.XX.XXX.XX"
        port="22" responseTimeout="10000" doc:name="SFTP" path="/FCD"
        password="XXXXX" user="alt"
        identityFile="C:/Users/kalyan/AnypointStudio/workspace02102015/ftp-server-pproject/src/main/resources/ppkKey/ALT.ppk"
        passphrase="XXXXX" />

I have mocked ip address, password in the above code snippet and in below error also.

But I am getting below error at runtime.

com.jcraft.jsch.JSchException: The cipher 'aes256-cbc' is required, but it is not available.

and

java.io.IOException: Error during login to alt@XXX.XX.XXX.XX: The cipher 'aes256-cbc' is required, but it is not available.

Can some one please help me to resolve the error.

Kalyan
  • 99
  • 1
  • 16

1 Answers1

8

The identity file can be changed into open SSH format by using puttygen.:

1.) Press Load and select the Private Key that was created with PuTTYgen.
2.) Enter the passphrase to load the key.
3.) From the Conversions menu select export OpenSSH key
4.) Save the private key.

By then using the following in your code, you should be able to connect:

jsch.addIdentity("D:\\Path\\to\\open\\SSHKey","Password");

Jazz
  • 83
  • 1
  • 4