[ 
https://issues.apache.org/jira/browse/SSHD-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14944933#comment-14944933
 ] 

Goldstein Lyor commented on SSHD-567:
-------------------------------------

Need some more information:

1. Can you debug the code and send the negotiated parameters - you can set a 
breakpoint at _AbstractSession#setNegotiationResult()_ and then see (and attach 
to this issue) the contents of the KEX. Additionally, you can set a breakpoint 
at _DHG_ class line 66 (the one that causes the exception) and then see (and 
attach to this issue) the problematic value.

2. Alternatively (or in addition) set the _org.apache.sshd_ log level to DEBUG 
and attach the log file to this issue

> Connection to Cisco caused java.security.InvalidAlgorithmParameterException
> ---------------------------------------------------------------------------
>
>                 Key: SSHD-567
>                 URL: https://issues.apache.org/jira/browse/SSHD-567
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>         Environment: Ubuntu 14.04, Oracle JVM 1.8.0_45, Cisco c2900, SSH v2
>            Reporter: Max Vetrenko
>
> SshClient client = SshClient.setUpDefaultClient();
> final ClientSession session = client.connect(username, host, 
> port).await().getSession();
> This code cause Exception: 
> java.security.InvalidAlgorithmParameterException: Prime size must be multiple 
> of 64, and can only range from 512 to 2048 (inclusive)
>       at 
> com.sun.crypto.provider.DHKeyPairGenerator.initialize(DHKeyPairGenerator.java:120)
>       at 
> java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:674)
>       at java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:411)
>       at org.apache.sshd.common.kex.DHG.getE(DHG.java:66)
>       at org.apache.sshd.client.kex.DHGEXClient.next(DHGEXClient.java:110)
>       at 
> org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:395)
>       at 
> org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:349)
>       at 
> org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:487)
>       at 
> org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:848)
>       at 
> org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:331)
>       at 
> org.apache.sshd.common.session.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:57)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:220)
>       at 
> org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:212)
>       at 
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:34)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:31)
>       at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
>       at sun.nio.ch.Invoker$2.run(Invoker.java:218)
>       at 
> sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> Application terminates after exception.
> OpenSSH server works fine



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to