SSH Tunnel - Cannot run program ssh-keygen error
See original GitHub issueI 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)
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Dbeaver SSH Tunnel Error - mysql - Ask Ubuntu
This is the answer by EugeneSmoliy on github. Run this on your key to convert it to RSA private key. Helped me. ssh-keygen...
Read more >DBeaver ssh tunnel invalid private key - Stack Overflow
This error is due to the format of the SSH private key. By default, ssh-keygen is creating a private key using the OpenSSH...
Read more >Why SSH login works in shell but fails in all third parties via ...
I can connect to 127.0.0.1:6379, i.e., the tunnel is working. Why via third party is this not working? In remote server is running...
Read more >Problems and Solutions (SSH, The Secure Shell
The commands ssh, scp, ssh-agent, ssh-keygen, etc., aren't doing what I expect. ... When I try to connect to an SSH server, I...
Read more >SSH Tunneling: Client Command & Server Configuration
SSH port forwarding is a mechanism in SSH for tunneling application ports from the ... It can also be abused by hackers and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.