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.

SSH (with SSHJ) does work for all servers except one

See original GitHub issue

I’m using Ubuntu 21.10 with DBeaver 22.0.3.

I have mutliple SSH profiles configured, all using the bundled SSHJ with the exact same connection settings. The only difference is the hostname, port and username, of course. All use the same private key, of this format: -----BEGIN RSA PRIVATE KEY-----

However, on one single of these connections I get the error Exhausted available authentication methods. This connection does work on the shell via ssh connection-name, however!

If I open the general settings (last entry in main menu “Window”) and there go to Connections -> SSH2, then the known hosts tab does not list the server in question, but it actually is in the known_hosts file (that’s why it works from the shell)!

The only difference I see between the lines in known_hosts file is this: the working/DBeaver-listed ones use ssh-rsa and the not-working/not-listed one uses ssh-ed25519 as encryption algorithm. But this is determined by the foreign server and out of my control, AFAIK (because this is the key algorithm used by the server key).

Is this a bug or do I somehow have to enable SSHJ/DBeaver to be able to handle the ed25519 algorithm from the known_hosts file?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
skotoscommented, Apr 28, 2022

Please consider SSHJ 0.33.0 as I believe they have finally allowed for better detection of ssh-rsa2 when openssh is not using ssh-rsa.

0reactions
camlafitcommented, Nov 25, 2022

Hello

I think I’m in same trouble as explained before. I’ve tried to connect over ssh with ed25519 and get this error :

Unable to reach a settlement of Client2ServerMACAlgorithms: [hmac-sha1, hmac-sha1-etm@openssh.com, hmac-sha1-96, hmac-sha1-96@openssh.com, hmac-md5, hmac-md5-etm@openssh.com, hmac-md5-96, hmac-md5-96-etm@openssh.com, hmac-sha2-256, hmac-sha2-256-etm@openssh.com, hmac-sha2-512, hmac-sha2-512-etm@openssh.com, hmac-ripemd160, hmac-ripemd160-etm@openssh.com, hmac-ripemd160-96, hmac-ripemd160@openssh.com] and [umac-128-etm@openssh.com]

I’ve tried with SSHj and JSch implementation. I’m up to date to now (Version 22.2.5.202211202223)

With terminal and same key with(out) agent It’s ok.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to keep SSH connections alive using SSHJ?
Since I have no control of the server, I have to keep the connection alive: With a regular SSH client, I could specify...
Read more >
Could not connect to host – IDEs Support (IntelliJ Platform)
SSH was reachable by mean of password in my terminal, but would'nt connect with Clion. "Can't connect to remote host: net.schmizz.sshj.transport ...
Read more >
ubuntu - Can't ssh into my server from home linux but can ssh ...
SSH working perfectly all machines except one in which Linux is troubling connection, and in same machine using Windows everything working fines ...
Read more >
SSH Connection With Java - Baeldung
As we can see, SSHD requires defined timeouts for every operation. It also allows us to define how long it will wait for...
Read more >
Executing remote tasks through SSH fails when using key - Jira
SSHClient.auth(SSHClient.java:205) at net.schmizz.sshj.SSHClient. ... But ssh server does not allow authentication of users with empty passwords.
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