Open explor4268 opened 4 months ago
It looks like Pterodactyl Wings SFTP Server only support the following key exchanges:
KeyExchanges: []string{
"curve25519-sha256", "curve25519-sha256@libssh.org",
"ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521",
"diffie-hellman-group14-sha256",
},
which Acode doesn't support because of the missing BouncyCastle dependency in Acode (#674)
Details
Acode Version: 1.10.3 (F-Droid) OS Version: Android 10 (doesn't really matter, also affects other devices with different Android versions) SFTP Host: Pterodactyl Wings SFTP Server
SSH-2.0-Go
(Go SSH Library, see below for relevant source codes) Extensions/Plugins: None Key files are generated withOpenSSH_9.7p1, OpenSSL 3.2.1
from Termux Packages.Steps to reproduce
ssh-keygen -t rsa -b 4096
, and withssh-keygen -t rsa-sha2-256 -b 4096
(not attempting ed25519 because of Acode not supporting ed25519 keys). With key file add the public key into the Account -> SSH Keys section on the panel. (Don't forget to re-add everytime the key is regenerated with that command)adb logcat
with argument-T 0
to avoid other unrelated logs)<server>
)"<server>
". (see logcat output below)However, connecting with
OpenSSH_9.7p1, OpenSSL 3.2.1
SSH Client (not Acode) with both password and the exact samersa-sha2-256
key file authentication (because OpenSSH disabled RSA-SHA1 support by default) succeeded without any errors.Also connecting to
OpenSSH_9.7p1
SFTP servers with Acode works fine and I can browse, read, and write into files.So far, I am facing this issue on two different Pterodactyl host provider with the exact same issue.
UPDATE: The BouncyCastle issue is likely the root cause of this issue, see below for links and issuecomment
This seems like an issue with the JAdaptive Maverick SSH Library used in Acode, but also an Acode issue if the issue is already fixed upstream and Acode not updated its dependencies. This issue is also related to the Ed25519 key issue where Acode is missing the recommend BouncyCastle dependency.I will attempt to pinpoint the root cause by creating a sample SFTP server with go sftp and ssh library, then connecting it with Acode or with Maverick SSH Library directly. Wait for this issue updates.adb logcat -T 0
outputUsing key file authentication (both RSA SHA-1 and RSA SHA-256), after pressing on "OK", the app starts to output warnings and errors every few seconds as shown below:
Finally, the errors stopped after it shows "Failed to connect" error at the end.
Connecting with password authentication also outputs similar warnings and errors, but the
connectUsingKeyFile
error is only specific to comnecting using a key file. (Using password authentication shows the exact same error prompt)Alternatives
If anyone had other alternatives, please leave a comment here on this issue.
Relevant links and issues
674 (cannot add the recommended BouncyCastle dependency)
Updates to this issue