You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2013/07/23 17:22:49 UTC

[jira] [Resolved] (SSHD-169) Exceptions Handling: java.lang.IllegalStateException Unable to negociate key exchange

     [ https://issues.apache.org/jira/browse/SSHD-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SSHD-169.
----------------------------------

    Resolution: Won't Fix
      Assignee: Guillaume Nodet

I've raised the log levels of the ootb KeyPairProvider to WARN so that one can easily identify the problem.
There's not much more we can do I think.  As a workaround, if you really want to have custom management of the server key pair, you can easily subclass the provider you use and provide additional behavior.
If you have other suggestions, please reopen.
                
> Exceptions Handling: java.lang.IllegalStateException Unable to negociate key exchange
> -------------------------------------------------------------------------------------
>
>                 Key: SSHD-169
>                 URL: https://issues.apache.org/jira/browse/SSHD-169
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>         Environment: uname -a
> Linux vm-dcache-deploy5 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux
> java -version
> java version "1.6.0_18"
> OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze1)
> OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
>            Reporter: Christian Bernardt
>            Assignee: Guillaume Nodet
>              Labels: exception, exception-handling, keys, permissions, server, sshd
>
> To reproduce the problem:
> 1.) Create dsa SERVER keys, set permissions and ownership
> 2.) Start the SshServer
> 3.) Initiate client ssh connection to this server(to check it is working)
> 4.) alter ownership of dsa SERVER keys
> 5.) Initiate client ssh connection to this server
> You will get the exception that you can find below.
> While this exception is totally valid, because I just stole the server its keys I would like to be able to react on such an exception by saying in server logs: Hey the server key permissions are wrong. I did not find a way to catch this exception on my side of the code.
> Is this intended or am I not seeing the way to do that?
> Thanks.
> Chris
> ----------------------------------------
> [] Exception caught
> java.lang.IllegalStateException: Unable to negociate key exchange for item 1
> 	at org.apache.sshd.common.session.AbstractSession.negociate(AbstractSession.java:902) ~[sshd-core-0.6.0.jar:0.6.0]
> 	at org.apache.sshd.server.session.ServerSession.handleMessage(ServerSession.java:159) ~[sshd-core-0.6.0.jar:0.6.0]
> 	at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:538) ~[sshd-core-0.6.0.jar:0.6.0]
> 	at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:232) ~[sshd-core-0.6.0.jar:0.6.0]
> 	at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:58) ~[sshd-core-0.6.0.jar:0.6.0]
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716) ~[mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:693) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:646) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:635) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:67) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1079) [mina-core-2.0.2.jar:na]
> 	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.2.jar:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_18]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.6.0_18]
> 	at java.lang.Thread.run(Thread.java:636) [na:1.6.0_18]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira