-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SFTP over OpenSSH server doesn't work #4170
Comments
@TranceLove ping |
From https://pastebin.com/RSz4EMUZ it seems you're using the OpenSSH server provided by Windows. The version string IIRC there were similar reports about using Amaze FM with OpenSSH server on Windows, though that was with 3rd party implementations, and seems problem was with "chrooting" specified directory. This error log seems not the same case 🤔 |
Hi, I'm facing the same issue using a Linux OpenSSH daemon/sftp server. My client device is a Samsung Note 9 (Amaze v3.10, F-Droid), server is NixOS (OpenSSH_9.6p1, OpenSSL 3.0.13 30 Jan 2024). |
On Amaze 3.8.2 it worked exactly once, was very slow (10Mbps download on a 300Mbps link) and then doesn't connect again or display the same error |
For @KhalilSantana 's report, my quick test of listing files and copy file, using current I'm using password authentication. May perhaps more details on reproducing your symptom will be more helpful. |
I'm using a password-protected, ed25519 SSH private key, which is stored locally on the phone's internal storage |
My quick test with passphrase protected ed25519 keys against the same NixOS appliance and same OpenSSH server, even with conventional Upstream sshj library does support passphrase protected ed25519 keys - I did wrote an unit test as well. So I think it's more a protocol wise problem rather than Amaze's own. Sorry but if there's a combination that will work, I'll be glad to look into it. (Answer re: slow I/O problems in next comment) |
Re @lensaj 's problem, I made a quick test with Windows's own OpenSSH installed via optional features in Windows 11. Copy/move files did worked for me with current So my next guess would be the code parsing the paths. No need to know what's in the file, but I would like to know the path of the file in question - possible that some special characters I'm unaware of 🥲 |
Maybe it is only looking at the authorized_keys file in Maybe try this in your configuration.nix (and then rebuild-switch before testing again)
|
If according to https://nixos.wiki/wiki/SSH_public_key_authentication, NixOS does honour I just also tried key-based authentication with ed25519 key without passphrase, and by pasting the public key to |
Re: slow file I/O over SSH, unfortunately I think this is the best we can do given the available resources and knowledge :/ With #3829 I made a few changes apart from fixing problems, also to prevent parallel file I/O over SSH which would made I/O performance even worse. Then the rest, with the current stream-based I/O between upstream sshj and Amaze, IMO I'm seeing little room for improvement, if large scale code optimization is not possible at the moment. Possible to use native (C/Go/Rust-based?) I/O, but that's completely other story then... |
Looking at the upstream SSHJ issue tracker, it seems others are also observing the same slowness symptoms: SSHJ issue 688 |
I made use of AmazeFileManager/app/src/main/java/com/amaze/filemanager/filesystem/HybridFile.java Lines 1098 to 1128 in dd693b7
Perhaps we may adjust the size of BufferedInputStream - from the comment in sshj/688 it makes a buffer of 1024*1024 = 1048576 = 1MB while we have only 64KB 🤦♂️ ( AmazeFileManager/app/src/main/java/com/amaze/filemanager/filesystem/files/GenericCopyUtil.java Lines 128 to 130 in dd693b7
|
Issue spotted on Samsung A23, Android 14, amaze v3.10 Error report: Issue explanation (write below this line)Exception
Crash log
|
Looks like you're copying a large file? Just for knowing, to help me on reproducing the issue 🙇 |
I choose AFM as a client for my smartphone to exchange files with my laptop.
A connection has been created to authenticate with privkey, and when is established, it correctly chroots the folder indicated in sshd_config
Problems come at this point, when I select copy from some file's 3-point menu, and paste it on the other side of the connection, either way.
See screenshot for message error,
The same server/user config is working fine with total command on an android tablet
Anyway, I am going to attach a part of the sshd log since I notice that there is no entry with scp command or other file operation
https://pastebin.com/RSz4EMUZ
Thank you. This app is very nice, I hope to use it for this purpose.
The text was updated successfully, but these errors were encountered: