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
The complete steps to add the algorithms to the RECEIVING server (the one you are connecting to). I'm assuming this is a Linux server.
sudo /etc/ssh/sshd_config
Add this to the file (it can be at the end):
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
Then restart the SSH server:
sudo service sshd restart
Finally a solution that works without having to make any changes to the server:
Download the latest jsch.jar as Yvan suggests: http://sourceforge.net/projects/jsch/files/jsch.jar/ jsch-0.1.52.jar works fine
Place the downloaded file in your "...\JetBrains\PhpStorm 8.0.1\lib", and remove the existing jsch-file (for PHPStorm 8 it's jsch-0.1.50.jar)
Restart PHPStorm and it should work
Use the same solution for Webstorm
The solution for me was to install the oracle unlimited JCE and install in JRE_HOME/lib/security. Then restarted glassfish and I was able to connect to my sftp server using jsch.
Make sure that you're using the latest version of JSch. I had this exact same problem when using JSch 0.1.31 and trying to connect to a RedHat 5 server. Updating to the latest version solved the problem.
I had the same issue, running Netbeans 8.0 on Windows, and JRE 1.7.
I just installed JRE 1.8 from https://www.java.com/fr/download/ (note that it's called Version 8
but it's version 1.8 when you install it), and it fixed it.
add KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 to your sshd_config on the server.
This worked, but make sure you restart sshd: sudo service sshd restart