Discussion:
[JSch-users] Using diffie-hellman-group-exchange-sha256
Ville Suoranta
2014-10-27 15:42:30 UTC
Permalink
Hello,

I have a question about key exchange algorithms:

According to the release notes diffie-hellman-group-exchange-sha256 is
supported, and looking at the source it looks like this is otherwise in
place, but it is not added in the kex list in the config.

How should I go about adding diffie-hellman-group-exchange-sha256 to the
kex list?

--Ville
Ville Suoranta
2014-10-28 17:30:44 UTC
Permalink
Got this figured out, Just in case someone else is having the same question:

Session session = null;
Channel channel = null;
ChannelSftp channelSftp = null;

try{
JSch jsch = new JSch();
session = jsch.getSession(SFTPUSER,SFTPHOST,SFTPPORT);
session.setPassword(SFTPPASS);
java.util.Properties config = new java.util.Properties();
config.put("kex",
"diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,
diffie-hellman-group-exchange-sha256");
config.put("StrictHostKeyChecking", "no");
session.setConfig(config);
Post by Ville Suoranta
Hello,
According to the release notes diffie-hellman-group-exchange-sha256 is
supported, and looking at the source it looks like this is otherwise in
place, but it is not added in the kex list in the config.
How should I go about adding diffie-hellman-group-exchange-sha256 to the
kex list?
--Ville
Loading...