-
Notifications
You must be signed in to change notification settings - Fork 360
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
Can mina sshd be used in Android? #322
Comments
We do not have many requests to run SSHD on Android, so we never invested any R&D on it. That being said, I believe that with a few tweaks (like the one suggested here), it could be made to support Android. Like I said, we do not have many requests to run SSHD on Android, and since our R&D resources are extremely low, we cannot really spend time on it. However, all is not lost - we welcome contributions, so if this piques your interest and you are willing to take the time, you can fork the project, make what changes you think are necessary and then submit a PR. We are more than willing to help with advice if you should need it. |
This reverts commit e73d9f4. If we use any JGit version above 6.2.x (as of this writing, the latest available version is 6.8.0.202311291450-r), we run into this problem: https://stackoverflow.com/questions/76549421/jgit-failure-in-cloning-repository. Naturally, we don't want to raise minSdkVersion to 33. But JGit 6.2.x depends on a version of the Apache MINA SSHD library (2.8.0) which does not handle Android well (see apache/mina-sshd#322). A later version (2.10.0) added basic Android awareness, but that version is not used by JGit until in v6.6.x. We are thus stuck using JGit v5 until the Android support in JGit v6 improves.
This reverts commit e73d9f4. If we use any JGit version above 6.2.x (as of this writing, the latest available version is 6.8.0.202311291450-r), we run into this problem: https://stackoverflow.com/questions/76549421/jgit-failure-in-cloning-repository. Naturally, we don't want to raise minSdkVersion to 33. But JGit 6.2.x depends on a version of the Apache MINA SSHD library (2.8.0) which does not handle Android well (see apache/mina-sshd#322). A later version (2.10.0) added basic Android awareness, but that version is not used by JGit until in v6.6.x. We are thus stuck using JGit v5 until the Android support in JGit v6 improves.
Hey, just FYI we do use mina-sshd in Android in the KDE Connect project 🙂 We just updated from v0.14.0 (from 10 years ago) to v2.13.1 😄 We haven't seen an issue with the Exceptions (yet?), but we did have to add a workaround to not use the Other than that, Mina SSHD runs quite well on Android. Since Android 11 (API version 30) it can run unmodified. On older versions it's not possible to use the |
Can you publish the code somewhere and let us take a look at it ? Perhaps we can incorporate it into the standard MINA offering |
The code is open source (GPL2 & GPL3) and can be found in https://invent.kde.org/network/kdeconnect-android/-/tree/master/src/org/kde/kdeconnect/Plugins/SftpPlugin |
Great - thanks... |
Probably you all are aware of this already and I'm making a fool of myself by stating the obvious :-) : the GPL (any version) is incompatible with the APL. |
We could honestly re-license this portion of code if you guys really want it, but we had to make so many hacks to make it work in older Android versions that I honestly think you are better off supporting only Android 11+ (which only needs the home directory to be overridden to work out of the box). |
I am aware of that (and you are not making a fool of yourself - it is an important observation). At this stage, I just wanted to take a look at the code and get a general impression of its underlying principles. If indeed we reach the decision to do something similar we will certainly need to review and resolve the licensing issues. |
I reached the same conclusion... |
I did some work on #580 |
Version
2.9.2
Bug description
I try to used mina sshd in Android but I have some problems:
Can mina sshd be used in Android? Or is there any android version of sshd can be used in Android?
Actual behavior
Expected behavior
sshd can run in android
Relevant log output
No response
Other information
No response
The text was updated successfully, but these errors were encountered: