[GH-ISSUE #998] SSH tunnel fails to connect #235

Closed
opened 2026-03-07 20:46:39 +03:00 by kerem · 4 comments
Owner

Originally created by @MingHuiLiu on GitHub (Aug 2, 2022).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/998

Error testing network handler endpoint:
Cannot add identity key

-----BEGIN OPENSSH PRIVATE KEY-----
PRIVATE Key Text
-----END OPENSSH PRIVATE KEY-----

Originally created by @MingHuiLiu on GitHub (Aug 2, 2022). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/998 Error testing network handler endpoint: Cannot add identity key -----BEGIN OPENSSH PRIVATE KEY----- PRIVATE Key Text -----END OPENSSH PRIVATE KEY-----
kerem 2026-03-07 20:46:39 +03:00
Author
Owner

@kseniiaguzeeva commented on GitHub (Aug 2, 2022):

Could you please give me more details of your issue? It help me to reproduce the issue and find a solution:

  • CloudBeaver version
  • Browser version
  • Do you run CloudBeaver via Docker or use another way?
  • Do you Proxy?
<!-- gh-comment-id:1202387997 --> @kseniiaguzeeva commented on GitHub (Aug 2, 2022): Could you please give me more details of your issue? It help me to reproduce the issue and find a solution: - CloudBeaver version - Browser version - Do you run CloudBeaver via Docker or use another way? - Do you Proxy?
Author
Owner

@kseniaguzeeva commented on GitHub (Sep 7, 2022):

I've noticed there is no updates during for a long time in this ticket. Feel free to contact me to reopen the issue if it's still actual for you.

<!-- gh-comment-id:1239062186 --> @kseniaguzeeva commented on GitHub (Sep 7, 2022): I've noticed there is no updates during for a long time in this ticket. Feel free to contact me to reopen the issue if it's still actual for you.
Author
Owner

@jeremyy44 commented on GitHub (Oct 12, 2022):

Hi,
I have the same issue.
I run cloudbeaver 22.2.2 in docker.
I acces it localy on the same network.
Here is the logs I get when trying to tunnel using a ssh key.

`Error testing network handler endpoint:
Cannot add identity key
com.jcraft.jsch.JSchException: invalid privatekey: [B@2bede831
	at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:46)
	at com.jcraft.jsch.JSch.addIdentity(JSch.java:441)
	at org.jkiss.dbeaver.model.net.ssh.SSHImplementationJsch.addIdentityKeyValue(SSHImplementationJsch.java:267)
	at org.jkiss.dbeaver.model.net.ssh.SSHImplementationJsch.setupTunnel(SSHImplementationJsch.java:76)
	at org.jkiss.dbeaver.model.net.ssh.SSHImplementationAbstract.initTunnel(SSHImplementationAbstract.java:134)
	at org.jkiss.dbeaver.model.net.ssh.SSHTunnelImpl.initializeHandler(SSHTunnelImpl.java:75)
	at io.cloudbeaver.service.core.impl.WebServiceCore.testNetworkHandler(WebServiceCore.java:577)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)`

Here is my docker-compose.yml

version: "3.8"

services:
  cloudbeaver:
      image: dbeaver/cloudbeaver:latest
      container_name: cloudbeaver
      restart: always
      ports:
        - 8978:8978
      volumes: 
        - /mnt/media/docker-files/cloudbeaver:/opt/cloudbeaver/workspace     
      environment:
        - PUID=1000
        - PGID=1000
        - TZ=America/Toronto
      network_mode: "bridge" 
<!-- gh-comment-id:1275502636 --> @jeremyy44 commented on GitHub (Oct 12, 2022): Hi, I have the same issue. I run cloudbeaver 22.2.2 in docker. I acces it localy on the same network. Here is the logs I get when trying to tunnel using a ssh key. ``` `Error testing network handler endpoint: Cannot add identity key com.jcraft.jsch.JSchException: invalid privatekey: [B@2bede831 at com.jcraft.jsch.KeyPair.load(KeyPair.java:664) at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:46) at com.jcraft.jsch.JSch.addIdentity(JSch.java:441) at org.jkiss.dbeaver.model.net.ssh.SSHImplementationJsch.addIdentityKeyValue(SSHImplementationJsch.java:267) at org.jkiss.dbeaver.model.net.ssh.SSHImplementationJsch.setupTunnel(SSHImplementationJsch.java:76) at org.jkiss.dbeaver.model.net.ssh.SSHImplementationAbstract.initTunnel(SSHImplementationAbstract.java:134) at org.jkiss.dbeaver.model.net.ssh.SSHTunnelImpl.initializeHandler(SSHTunnelImpl.java:75) at io.cloudbeaver.service.core.impl.WebServiceCore.testNetworkHandler(WebServiceCore.java:577) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source)` ``` Here is my docker-compose.yml ``` version: "3.8" services: cloudbeaver: image: dbeaver/cloudbeaver:latest container_name: cloudbeaver restart: always ports: - 8978:8978 volumes: - /mnt/media/docker-files/cloudbeaver:/opt/cloudbeaver/workspace environment: - PUID=1000 - PGID=1000 - TZ=America/Toronto network_mode: "bridge" ```
Author
Owner

@MingHuiLiu commented on GitHub (Oct 12, 2022):

Could you please give me more details of your issue? It help me to reproduce the issue and find a solution:

  • CloudBeaver version
  • Browser version
  • Do you run CloudBeaver via Docker or use another way?
  • Do you Proxy?

CloudBeaver version: last version in linux docker
sql server runs on win server and connects through open ssh (win) tunnel

<!-- gh-comment-id:1275715817 --> @MingHuiLiu commented on GitHub (Oct 12, 2022): > Could you please give me more details of your issue? It help me to reproduce the issue and find a solution: > > * CloudBeaver version > * Browser version > * Do you run CloudBeaver via Docker or use another way? > * Do you Proxy? CloudBeaver version: last version in linux docker sql server runs on win server and connects through **open ssh (win) tunnel**
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#235
No description provided.