I am trying to connect to remote sftp server over ssh with JSch (0.1.44-1) but during \"session.connect();\" I am getting this exception:
com.jcraft.jsch.JS
There are a couple of places that SSH clients and servers try and agree on a common implementation. Two I know of are encryption and compression. The server and client produce a list of available options and then the best available option in both lists is chosen.
If there is no acceptable option in the lists then it fails with the error you got. I'm guessing from the debug output here but it looks like the only server options for encryption are "aes256-cbc hmac-md5 none".
JSch doesn't do hmac-md5 and aes256-cbc is disabled because of your Java policy files. Two things you could try are...
To increase the available encryption libraries on the server, install unrestricted policy files on your client, enabling aes256-cbc (make sure the message saying it is disabled goes away, those policy files are notoriously easy to install on the wrong JVM) from the site:
For JDK 1.6: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
For JDK 1.7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
For JDK 1.8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
or try and disable encryption.
The first is ideal if you have access to the server (trust me aes128-cbc is plenty of encryption), but the second is easy enough to quickly test out the theory.
The issue is with the Version of JSCH jar you are using.
Update it to latest jar.
I was also getting the same error and this solution worked.
You can download latest jar from
http://www.jcraft.com/jsch/
I updated jsch lib latest one (0.1.55). working fine for me. no need to restart the server or no need to update java(current using java8)
FWIW, I had this same error message under JSch 0.1.50. Upgrading to 0.1.52 solved the problem.