question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auth fail with SSH Key and SSH Tunnel

See original GitHub issue

When trying to use an SSH Tunnel, I get the following error: Auth fail

  • DBeaver version: 21.3.0
  • MacOS 12.0.1
  • DBeaver SSHJ 1.0.91

My SSH key looks like this:

-----BEGIN OPENSSH PRIVATE KEY-----

[...]

-----END OPENSSH PRIVATE KEY-----

I can ssh into the server using the same SSH Key.

Error log:

!ENTRY org.jkiss.dbeaver.model 4 0 2021-12-01 16:39:31.264
!MESSAGE Cannot establish tunnel to 54.253.44.80:22
!SUBENTRY 1 org.jkiss.dbeaver.model 4 0 2021-12-01 16:39:31.264
!MESSAGE Cannot establish tunnel to 54.253.44.80:22
!SUBENTRY 2 org.jkiss.dbeaver.model 4 0 2021-12-01 16:39:31.264
!MESSAGE Auth fail
!STACK 0
com.jcraft.jsch.JSchException: Auth fail
	at com.jcraft.jsch.Session.connect(Session.java:519)
	at com.jcraft.jsch.Session.connect(Session.java:183)
	at org.jkiss.dbeaver.model.net.ssh.SSHImplementationJsch.setupTunnel(SSHImplementationJsch.java:111)
	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 org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:886)
	at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Thanks in advance.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:44 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
ddxvcommented, Aug 10, 2022

Recently two client machines (Ubuntu 22.04 and Mac OS) are able to SSH but unable to use dbeaver Jsch to connect to an Ubuntu 22.04 server.

The Ubuntu 22.04 client is able to use SSHJ in dbeaver and connect. The Mac OS client fails for both SSHJ and Jsch.

I found a bit more which seems to back up what @devvick reported:

It’s indeed quite likely that the server requires rsa-sha2. JSch does not support it. And as JSch seems not to be updated anymore, it quite likely never will.

There’s a fork of JSch that does though: https://github.com/mwiede/jsch https://stackoverflow.com/questions/73135640/jschexception-auth-fail-on-ubuntu-22-04

I would love to help resolve the issue, but am unsure what might constitute help here.

2reactions
jagannathsrscommented, Sep 22, 2022

Colleague of mine had the same issue. Even with the same credentials and Pem keys, it failed with exhausted all authentication methods for client dbeaver Only difference was that I am on a intel Mac and he’s on a M1 Mac.

The issue was resolved when he downloaded the M1/Silicon version of Dbeaver and used JSch method. Screen Shot 2022-09-22 at 9 30 26 AM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auth fail" when connecting your Database Connector via SSH ...
Question. You are trying to connect your Database Connector via SSH Tunnel and receive the following error: com.fivetran.port.
Read more >
SSH tunnel - auth fail - DBeaver Forum • View topic
This error (Auth fail) doesn't look like problem with credentials - there are different error messages for bad user/password. I can only guess, ......
Read more >
SSH Public key auth in SSHTunnelForwarder and dbeaver fails
I've tried to get the key to work both with DBeaver and using SSHTunnelForwarder in Python. Both fail with a garden variety message...
Read more >
ExecutionException: SSH: Auth fail
As a temporary workaround you need to specify `Auth type` as `OpenSSH config and authentication agent` and load your keys into agent: If...
Read more >
How to Fix SSH Failed Permission Denied (publickey,gssapi ...
One reason for the error may be sshd_config , the file that contains SSH server configuration. The other possibility is that the authorized_keys ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found