I am trying to do an SFTP using JSch, but I encountered some error:
com.jcraft.jsch.JSchException: The cipher \'aes256-cbc\' is required, but it is no
By default, JCE policies -which come with your JDK or JRE- don't support such techniques for ciphering like (ase-256,.. etc).
For sure you MUST replace your current JCE jars (exist on $JAVA_HOME/jre/lib/security) with compatible Jave version you have from oracle website.
Download links:
For JDK 1.6: https://www.oracle.com/java/technologies/jce-6-download.html
For JDK 1.7: https://www.oracle.com/java/technologies/javase-jce7-downloads.html
For JDK 1.8: https://www.oracle.com/java/technologies/javase-jce8-downloads.html
This will fix the problem.
This error also appear when your private key is in putty format and not in open ssh format.
You can convert the key with the tool puttygen to an open ssh format private key.
This solves the Problem for me. Replaceing the Java files was not necessary in my case with netbeans 8.0.2 and Java 8_25.
You need to add to Your JRE - java unlimited strength policy, eg.: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html Please replace local_policy and us_export_policy on the server's JRE path (\lib\security) Other version of JCE policies can be found on oracle web pages.