我正在尝试在后台进程中访问在 Linux 上运行的 opendaylight 服务器。我正在运行一个分发-karaf-0.2.1-Helium-SR1。
据我了解,如果您尝试从同一台机器连接,您需要做的就是运行
./client 并且连接将完成。
但是我得到的是:
[root@d20-srv-81-32 bin]# ./client 以 karaf 258 身份登录 [pool-2-thread-2] 警告 org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - 服务器位于 /0.0.0.0: 8101 提供了未验证的密钥:[root@d20-srv-81-32 bin]#
当我尝试使用简单的 ssh 进行连接时: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost 操作成功。
有没有人遇到过这个问题?
更多信息 ./client -v 结果
[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]#