dbeaver: SSH Tunnel - Cannot run program ssh-keygen error
I have SSHJ 1.0.73 installed and I’m running Dbeaver version 21.0.0.
When trying to set up a DB connection using an SSH tunnel, I get the following error:
Cannot run program "ssh-keygen": error=13,Permission denied error=13,Permission denied
My SSH key is already in OPENSSH format:
-----BEGIN OPENSSH PRIVATE KEY-----
[...]
-----END OPENSSH PRIVATE KEY-----
What should I do here? Thanks!
Edit: Found the error log
!ENTRY org.jkiss.dbeaver.model 4 0 2021-03-05 10:43:36.928
!MESSAGE error=13, Permission denied
!SUBENTRY 1 org.jkiss.dbeaver.model 4 0 2021-03-05 10:43:36.928
!MESSAGE error=13, Permission denied
!STACK 0
java.io.IOException: error=13, Permission denied
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
at java.base/java.lang.ProcessImpl.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at org.jkiss.dbeaver.model.net.ssh.SSHImplementationJsch.addIdentityKey(SSHImplementationJsch.java:189)
at org.jkiss.dbeaver.model.net.ssh.SSHImplementationJsch.setupTunnel(SSHImplementationJsch.java:60)
at org.jkiss.dbeaver.model.net.ssh.SSHImplementationAbstract.initTunnel(SSHImplementationAbstract.java:141)
at org.jkiss.dbeaver.model.net.ssh.SSHTunnelImpl.initializeHandler(SSHTunnelImpl.java:75)
at org.jkiss.dbeaver.ui.net.ssh.SSHTunnelConfiguratorUI.lambda$0(SSHTunnelConfiguratorUI.java:216)
at org.jkiss.dbeaver.ui.UIUtils.lambda$14(UIUtils.java:1657)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (4 by maintainers)
@AidanJHMurphy
To fix this set the ‘Implementation’ of your connection to SSHJ. You can find this under SSH -> Advanced Settings.
Ditto timnolte. Just ran into this after upgrading to 22.3.4. I downgraded to 22.3.3 and I’m not seeing the issue there, so it must only just be in the last minor version.
I’m currently on Ubuntu 20.04
you can use this solution, it helped me https://github.com/dbeaver/dbeaver/issues/3917#issuecomment-410616717
Got the debug logs @ShadelessFox, thanks for the link. I’m not comfortable listing the entire log here, but I’d be happy to send you them elsewhere (desktop vs terminal usage).
I found the problem. DBeaver wasn’t able to locate the SSH socket on my client machine to access the agent because I don’ t use the normal ssh socket - I use GPG authentication (via gpg-agent) for SSH access, and the appropriate variable is set in my shell whereas it isn’t available to GUI applications
I had to append the SSH_AUTH_SOCK variable to the desktop file as follows:
SSH tunnel access used to work, so I’m not sure why I had to make this change.