-
-
Notifications
You must be signed in to change notification settings - Fork 280
Algorithm negotiation fail on pull from remote #568
Comments
It's the most probable cause. |
According to this comparison matrix for SSH implementations Jsch does indeed lack the modern key exchange algorithms. Would it be sensible to migrate to SSHJ? |
Yes I feel that'll probably be for the best. Will take a stab at it soon. |
SSHJ's support for generating SSH keys seems to be missing which is a blocker for us because Jsch does support it. Are you aware of any alternatives to assist us in that? I'd really prefer using a proven and tested implementation rather than try to roll my own for the app. |
That's too bad, I overlooked that. Full disclosure: I don't have experience with Jsch or SSHJ, I only found them through some research online. That said, do you have access to the Bouncycastle API? In that case would this example help? Or maybe this example also using Bouncycastle? As a plan B, would it be acceptable to use OpenKeychain for SSH key management instead (as implemented in #486)? |
I ran into the same problem today. I got it working again by disabling the ED25519 SSH host key and going back to an RSA-based key. Not much of a security issue, but it would be nice to have more recent algorithms. |
That's a Jsch limitation that I can unfortunately do nothing about. If the ability to generate SSH keys will not be missed, I'll restart my efforts to migrate to SSHJ. |
After discussing with @Skrilltrax we both agree that it's in the project's best interests for us to avoid making any large changes to master and instead focus on making right choices from the get go on the v2 branch instead, so I'll not be attempting to migrate v1 to SSHJ. I'm currently looking into how best we can make use of SSHJ to create a feature-compatible replacement of Jsch out of it. I'm also investigating how to get around the need to disable StrictHostKeyChecking which enables MITM attack vectors as pointed out in #494. |
Closing this in favour of keeping discussion consolidated to #448 |
Hi, I'm trying to clone a password store repository using ssh public key authentication (from a hardened ssh server, meaning cryptos that are considered unsafe are not supported). However, upon pulling from the server, the app shows a dialog with a
TransportException
and the message "Algorithm negotiation fail":I've tried both the latest version from the F-Droid store (1.3.2) and latest commit (
b9e3967
) built with Android Studio. Both yield the same error message. I've also upgraded JGit to 5.5.1, hoping that would solve it, but sadly it doesn't.The stack trace below seems to suggest that the key exchange between client and server didn't succeed (that's what I conclude from
receive_kexinit
anyway). Could it be that Jsch does not support modern key exchange algorithms such as diffie-hellman-group14-sha256?The text was updated successfully, but these errors were encountered: