The cipher 'aes256-cbc' is required, but it is not available

前端 未结 3 1858
北海茫月
北海茫月 2020-11-27 16:12

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

相关标签:
3条回答
  • 2020-11-27 16:32

    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.

    0 讨论(0)
  • 2020-11-27 16:38

    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.

    0 讨论(0)
  • 2020-11-27 16:40

    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.

    0 讨论(0)
提交回复
热议问题