Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHJ usage on Android app in Kotlin #905

Open
StanRichie opened this issue Oct 18, 2023 · 2 comments
Open

SSHJ usage on Android app in Kotlin #905

StanRichie opened this issue Oct 18, 2023 · 2 comments

Comments

@StanRichie
Copy link

Hi, I am developing Android app, written in Kotlin, and I get the 'net.schmizz.sshj.common.SSHException: no such algorithm: X25519 for provider BC' error while trying to connect to an SSH server on remote local host. I discovered this article from 2018 -> https://android-developers.googleblog.com/2018/03/cryptography-changes-in-android-p.html I am targeting API 34. I was testing this library in Android 14, and Android 10 (API 29). Can you confirm, that SSHJ is not usable in Android apps as of right now?

@exceptionfactory
Copy link
Contributor

@StanRichie This issue sounds similar to the problems reported in issue #895.

In that case, the runtime version of Bouncy Castle was not new enough, resulting in the failures described. As you noted in the referenced blog, Android has made some changes in their cryptographic security provider configuration. This might be related, but as a starting point, I recommend checking the dependency tree to confirm that the compiled binary includes a recent version of Bouncy Castle. There are some different configuration classes in SSHJ to control security provider registration, so that may be a next step for evaluation.

@jjh9397
Copy link

jjh9397 commented Mar 29, 2024

Hi,
I ran into the same issue and found a method that fixed it by removing and reinserting the BouncyCastle provider: setupBouncyCastle()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants