Search code examples
linuxsshapache-karafkarafopendaylight

Karaf client failes to connect to a server under linux


I am trying to access an opendaylight server running on Linux in a back round process. I am running a distribution-karaf-0.2.1-Helium-SR1.

From what I understand in case you are trying to connect from the same machine all you need to do is run

./client and the connection will be done.

However all I get is :

[root@d20-srv-81-32 bin]# ./client Logging in as karaf 258 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key: [root@d20-srv-81-32 bin]#

When I to try to connect using a simple ssh: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost the operation is successful.

Has any one encountered the issue?

more info ./client -v result

[root@d20-srv-81-32 bin]# ./client -v
23 [main] INFO org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider
207 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Session created...
Logging in as karaf
215 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Server version string: SSH-2.0-SSHD-CORE-0.12.0
216 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_KEXINIT
227 [pool-2-thread-1] INFO org.apache.sshd.client.kex.DHG1 - Send SSH_MSG_KEXDH_INIT
234 [pool-2-thread-2] INFO org.apache.sshd.client.kex.DHG1 - Received SSH_MSG_KEXDH_REPLY
241 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
241 [pool-2-thread-2] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_NEWKEYS
245 [pool-2-thread-2] INFO org.apache.sshd.client.session.ClientSessionImpl - Send SSH_MSG_SERVICE_REQUEST for ssh-userauth
248 [main] INFO org.apache.sshd.client.auth.UserAuthAgent - Send SSH_MSG_USERAUTH_REQUEST for publickey
256 [pool-2-thread-5] INFO org.apache.sshd.client.auth.UserAuthAgent - Received SSH_MSG_USERAUTH_SUCCESS
306 [main] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_OPEN on channel 101
307 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send agent forwarding request
308 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_REQUEST pty-req
308 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_REQUEST env
309 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_REQUEST shell

[root@d20-srv-81-32 bin]#


Solution

  • in the end the issue was caused because i used the zip release of open day light helium.

    on the opendaylight download page there are two versions. one compressed as a zip and the other as tar.gz. from what i found there are system differences between them the zip is for windows and the tar for Linux.

    when i deployed the tar version on Linux the issue did not reproduce.