You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by conejo <lo...@gmail.com> on 2016/11/03 15:23:36 UTC
ssh:ssh fails on karaf 4.0.7
I tried the next command:
ssh:ssh -p 22 user@server
using karaf console and I have the next message in the log:
(I can connect to the same server using putty)
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)[sunjce_provider.jar:1.8.0_20]
at
java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:657)[:1.8.0_31]
at
java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:399)[:1.8.0_31]
at
org.apache.sshd.common.kex.DH.getE(DH.java:65)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.client.kex.DHGEX.next(DHGEX.java:118)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:425)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:326)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:306)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:780)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:308)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:184)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_31]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[48:org.apache.sshd.core:0.14.0]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.8.0_31]
at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.8.0_31]
at
sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.8.0_31]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_31]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_31]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_31]
2016-11-03 16:14:00,029 | ERROR | nsole user karaf | ShellUtil
| 43 - org.apache.karaf.shell.core - 4.0.7 | Exception caught while
executing command
org.apache.sshd.common.SshException: Authentication failed
at
org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:44)[48:org.apache.sshd.core:0.14.0]
at
org.apache.karaf.shell.ssh.SshAction.execute(SshAction.java:152)[44:org.apache.karaf.shell.ssh:4.0.7]
at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[43:org.apache.karaf.shell.core:4.0.7]
at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[43:org.apache.karaf.shell.core:4.0.7]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_31]
Caused by: org.apache.sshd.common.SshException: Session is closed
at
org.apache.sshd.client.session.ClientUserAuthServiceNew.preClose(ClientUserAuthServiceNew.java:220)
at
org.apache.sshd.common.util.CloseableUtils$AbstractCloseable.close(CloseableUtils.java:275)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$AbstractInnerCloseable.doCloseImmediately(CloseableUtils.java:356)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$AbstractCloseable.close(CloseableUtils.java:276)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$ParallelCloseable.doClose(CloseableUtils.java:182)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$SimpleCloseable.close(CloseableUtils.java:151)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$SequentialCloseable$1.operationComplete(CloseableUtils.java:205)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$SequentialCloseable$1.operationComplete(CloseableUtils.java:200)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$SequentialCloseable.doClose(CloseableUtils.java:215)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$SimpleCloseable.close(CloseableUtils.java:151)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$AbstractInnerCloseable.doCloseImmediately(CloseableUtils.java:356)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.session.AbstractSession.doCloseImmediately(AbstractSession.java:481)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.util.CloseableUtils$AbstractCloseable.close(CloseableUtils.java:276)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.session.AbstractSession.exceptionCaught(AbstractSession.java:468)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.AbstractSessionIoHandler.exceptionCaught(AbstractSessionIoHandler.java:47)
at
org.apache.sshd.common.io.nio2.Nio2Session.exceptionCaught(Nio2Session.java:125)
at
org.apache.sshd.common.io.nio2.Nio2Session.access$500(Nio2Session.java:46)
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onFailed(Nio2Session.java:199)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler$2.run(Nio2CompletionHandler.java:41)
at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_31]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.failed(Nio2CompletionHandler.java:39)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:195)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)[48:org.apache.sshd.core:0.14.0]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_31]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[48:org.apache.sshd.core:0.14.0]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.8.0_31]
at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.8.0_31]
at
sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.8.0_31]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_31]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_31]
... 1 more
--
View this message in context: http://karaf.922171.n3.nabble.com/ssh-ssh-fails-on-karaf-4-0-7-tp4048558.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: ssh:ssh fails on karaf 4.0.7
Posted by conejo <lo...@gmail.com>.
Hi JB,
Which parameter should I change?
--
View this message in context: http://karaf.922171.n3.nabble.com/ssh-ssh-fails-on-karaf-4-0-7-tp4048558p4048608.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: ssh:ssh fails on karaf 4.0.7
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
I guess you changed the key config in etc/org.apache.karaf.shell.cfg right ?
Regards
JB
On 11/03/2016 04:23 PM, conejo wrote:
> I tried the next command:
> ssh:ssh -p 22 user@server
>
>
> using karaf console and I have the next message in the log:
> (I can connect to the same server using putty)
>
> 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)[sunjce_provider.jar:1.8.0_20]
> at
> java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:657)[:1.8.0_31]
> at
> java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:399)[:1.8.0_31]
> at
> org.apache.sshd.common.kex.DH.getE(DH.java:65)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.client.kex.DHGEX.next(DHGEX.java:118)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:425)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:326)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:306)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:780)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:308)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:184)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
> at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_31]
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[48:org.apache.sshd.core:0.14.0]
> at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.8.0_31]
> at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.8.0_31]
> at
> sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.8.0_31]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_31]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_31]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_31]
> 2016-11-03 16:14:00,029 | ERROR | nsole user karaf | ShellUtil
> | 43 - org.apache.karaf.shell.core - 4.0.7 | Exception caught while
> executing command
> org.apache.sshd.common.SshException: Authentication failed
> at
> org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:44)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.karaf.shell.ssh.SshAction.execute(SshAction.java:152)[44:org.apache.karaf.shell.ssh:4.0.7]
> at
> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[43:org.apache.karaf.shell.core:4.0.7]
> at
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[43:org.apache.karaf.shell.core:4.0.7]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_31]
> Caused by: org.apache.sshd.common.SshException: Session is closed
> at
> org.apache.sshd.client.session.ClientUserAuthServiceNew.preClose(ClientUserAuthServiceNew.java:220)
> at
> org.apache.sshd.common.util.CloseableUtils$AbstractCloseable.close(CloseableUtils.java:275)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$AbstractInnerCloseable.doCloseImmediately(CloseableUtils.java:356)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$AbstractCloseable.close(CloseableUtils.java:276)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$ParallelCloseable.doClose(CloseableUtils.java:182)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$SimpleCloseable.close(CloseableUtils.java:151)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$SequentialCloseable$1.operationComplete(CloseableUtils.java:205)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$SequentialCloseable$1.operationComplete(CloseableUtils.java:200)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$SequentialCloseable.doClose(CloseableUtils.java:215)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$SimpleCloseable.close(CloseableUtils.java:151)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$AbstractInnerCloseable.doCloseImmediately(CloseableUtils.java:356)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.session.AbstractSession.doCloseImmediately(AbstractSession.java:481)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.util.CloseableUtils$AbstractCloseable.close(CloseableUtils.java:276)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.session.AbstractSession.exceptionCaught(AbstractSession.java:468)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.AbstractSessionIoHandler.exceptionCaught(AbstractSessionIoHandler.java:47)
> at
> org.apache.sshd.common.io.nio2.Nio2Session.exceptionCaught(Nio2Session.java:125)
> at
> org.apache.sshd.common.io.nio2.Nio2Session.access$500(Nio2Session.java:46)
> at
> org.apache.sshd.common.io.nio2.Nio2Session$1.onFailed(Nio2Session.java:199)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler$2.run(Nio2CompletionHandler.java:41)
> at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_31]
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.failed(Nio2CompletionHandler.java:39)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:195)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)[48:org.apache.sshd.core:0.14.0]
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
> at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_31]
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[48:org.apache.sshd.core:0.14.0]
> at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.8.0_31]
> at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.8.0_31]
> at
> sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.8.0_31]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_31]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_31]
> ... 1 more
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/ssh-ssh-fails-on-karaf-4-0-7-tp4048558.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: ssh:ssh fails on karaf 4.0.7
Posted by conejo <lo...@gmail.com>.
Thank you Zoran. I will wait to version 4.1.0
--
View this message in context: http://karaf.922171.n3.nabble.com/ssh-ssh-fails-on-karaf-4-0-7-tp4048558p4048562.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: ssh:ssh fails on karaf 4.0.7
Posted by Zoran Regvart <zr...@redhat.com>.
Hi Luis,
SUN JCE provider shipped with JDK places restrictions on Diffie
Hellman modulus bit size to range from 512 to 2048 bits in increments
of 64 bits[1]. Support for bigger keys is due in Java 9[2].
Your SSH server probably has Diffie Hellman modulus size > 2048,
possibly to circumvent LOGJAM vulnerability[3], or is using key size
that is not modulo 64.
You can:
- either change the Diffie Hellman key exchange settings of your SSH server, or
- upgrade to a newer version of karaf (4.1.x) [4] that includes newer
version of Apache SSHD[5], or
- install Bouncy Castle with priority over SUN JCE[6] (not recommended, really)
zoran
[1] https://github.com/openjdk-mirror/jdk/blob/jdk8u/jdk8u/master/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java#L83-L88
[2] https://bugs.openjdk.java.net/browse/JDK-8072452
[3] https://weakdh.org/
[4] https://issues.apache.org/jira/browse/KARAF-4461
[5] https://issues.apache.org/jira/browse/SSHD-589
[6] http://www.bouncycastle.org/wiki/display/JA1/Provider+Installation#ProviderInstallation-InstallingtheProviderStatically
On Thu, Nov 3, 2016 at 4:23 PM, conejo <lo...@gmail.com> wrote:
> I tried the next command:
> ssh:ssh -p 22 user@server
>
>
> using karaf console and I have the next message in the log:
> (I can connect to the same server using putty)
>
> java.security.InvalidAlgorithmParameterException: Prime size must be
> multiple of 64, and can only range from 512 to 2048 (inclusive)
--
Zoran Regvart
zregvart@redhat.com