wolpi / prim-ftpd

FTP server app for android
Other
580 stars 78 forks source link

sftp connection refused after update to android 13 #316

Closed diesendungmitdermaus closed 10 months ago

diesendungmitdermaus commented 11 months ago

Hi!

I recently updated my phone from android 11 to 13. Lots of things breaking, and unfortunately also primitive ftpd.

I want to mount the phone's storage to the other machine with sftp, and then a script copies the files I want to backup. (I have been doing this for years on multiple phones with primitive ftp, always works really well.)

Primitive ftpd is set to "filesystem" and access is with username and password. There is no SD card, only internal storage. The "Access all files" permission is enabled for primitive ftpd.

The error message is "read: Connection reset by peer" or "Connection refused", depending on the software used. It does not ask for the password.

Ftp works fine. But I want sftp.

I'm pretty sure it's something with the permissions on android, but the app has all permissions it possibly can have.

I would rather not mount individual folders separately. If it is still possible, I very much prefer mounting the whole storage (/storage/emulated/0) and then have the flexibility in the script.

Any help or suggestions are very much appreciated! Thank you!

wolpi commented 11 months ago

In order to find root cause for that more information is needed.

Helpful are screenshots of the app and log files.

diesendungmitdermaus commented 11 months ago

Hi!

After I re-read what I had written above, I suspected it might have something to do with the secure authorization. I re-installed the app. That creates new keys for the secure connection. I removed the old key from the authorized_keys on the other side. But still, no connection.

Today I had some time and sat down to document everything properly and to create the log files and screenshots for you. Well, guess what? It works! It finally asked me about the new key (never did that before), I could accept the key, and that was it!

I guess something was still cached somewhere.

Thank you!

wolpi commented 10 months ago

Happy that it works :smile:

btw: You can generate new keys by touching the small refresh icon next to fingerprints on app start page.