SSH issue: unable to open SSH session due to invalid crypto configuration

asked 2017-05-12 02:59:39 -0700

Hi all,

I'm using the Opendaylight Boron Distribution and I have got some problems to connect it to a NETCONF server embedded in a ConfD simulator using SSH. This issue seems to appear from Boron SR2 release and seems not have been resolved yet.

An Invalid Algorithm Parameter Exception is raised when trying to connect Opendaylight to a NETCONF device and OpenDaylight fails to open an SSH session with the device :

2017-05-03 16:40:53,927 | INFO | 3]-nio2-thread-2 | ClientSessionImpl | 30 - org.apache.sshd.core - 0.14.0 | Server version string: SSH-2.0-ConfD-6.0 2017-05-03 16:40:53,928 | WARN | 3]-nio2-thread-7 | ClientSessionImpl | 30 - org.apache.sshd.core - 0.14.0 | Exception caught DH key size must be multiple of 64, and can only range from 512 to 2048 (inclusive). The specific key size 4096 is not supported

2017-05-03 16:40:53,929 | WARN | 3]-nio2-thread-7 | AsyncSshHandler | 217 - org.opendaylight.netconf.netty-util - 1.2.0.SNAPSHOT | Unable to setup SSH connection on channel: [id: 0x19ec738f] org.apache.sshd.common.SshException: Session is closed

One workaround is to locate mina sshd jar in Opendaylight distribution’s system folder. From Boron release, it is :

  • Go to : [ODLprojectfolder]/karaf/target/assembly/system/org/apache/sshd/sshd-core/0.14.0/sshd-core-0.14.0.jar
  • Open the jar file, locate META-INF/MANIFEST.MF file and edit the file
  • Find org.bouncycastle.openssl;version=”[1.51,2)”;resolution:=optional (at the end of the MANIFEST.MF file) and then delete ;resolution:=optional

Note that this must be done after the project's compilation, but before Karaf is started for the first time.

Does anyone know if and when this issue will be fixed ?

Thanks, Christophe

edit retag flag offensive close merge delete