TeamAmaze / TeamAmaze/AmazeFileManager
SFTP connection keeps closing on every operation
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 6.4k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
Describe the bug
It appears SFTP connection closes and re-opens on every operation. Not only is this very inefficient, it also triggers key password prompt on every open.
To Reproduce
Steps to reproduce the behavior:
- Create a SFTP connection that uses a private key with a passphrase
- Open connection
- Enter key password
- Open a folder inside
- You will be asked for a password again
Expected behavior
SFTP session should remain open throughout the app session
Smartphone (please complete the following information):
- Device: Pixel 9 Pro Fold
- OS: Android 16
- Rooted: Yes
- Version: 622d0f8b5fc75acb828e68dedb98c776ac9ca53c
Additional context
Force setting closeClientOnFinish here to false appears to fix the issue, but I'm not sure what the implication is - there probably was a reason that this is set to true by default
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in app/src/main/java/com/amaze/filemanager/filesystem/ssh/SshClientTemplate.kt at the closeClientOnFinish setting. Reproduce the passphrase prompt by opening an SFTP connection and then opening a folder, and inspect why the client is closed between operations. Done means the SFTP session remains open for the app session without repeatedly requesting the key password, while preserving the intended connection cleanup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100