1

I am searching the implementation of key exchange algorithms for j2ssh core 0.2.9 as below.

diffie-hellman-group-exchange-sha1
diffie-hellman-group14-sha1
diffie-hellman-group1-sha1
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521

Above all should be able to supports j2ssh core library version 0.2.9 and able to add them like how the existing j2ssh core library using key algorithm i.e DhGroup1Sha1 by default

Currently, In my application, I am using j2ssh core library version[0.2.9]. Switching to other j2ssh library is not feasible for me due to some time constraints.

Please help me out if you have any good solution

Sunil Garg
  • 14,608
  • 25
  • 132
  • 189

1 Answers1

1

Your using an outdated API. The original J2SSH API has not been maintained for over a decade and I would strongly suggest you stop using it. And I'm saying this as the original author of that API.

Since your using SSH you are concerned with keeping your connections secure therefore you should be using an up to date API that implements the latest security and practices.

There is a replacement API that is maintained currently and supports these key exchange algorithms at https://github.com/sshtools/j2ssh-maverick

  • Thanks a lot for your reply and suggestion. I checked the jssh-maverick and found all the algorithms implemented there. But in j2ssh-maverick I didn't find the way to tell the SSHSession to asynchronously notify the ChannelEventListener. In core j2ssh 0.2.9, a class SessionOutputReader was provided for the same. – bharat gade Feb 24 '17 at 08:44
  • @bharatgade The [EventBasedChannel.java](https://github.com/sshtools/j2ssh-maverick/blob/master/j2ssh-maverick/src/main/examples/EventBasedChannel.java) example shows how to do that. Pass the event listener into openSessionChannel method when you create the session. There is no SessionReaderOutput equivalent but you could probably quite easily re-create something similar. – Lee David Painter Feb 25 '17 at 10:03