[GH-ISSUE #2231] Feature Request: Replace SSHFS-Win with rclone for Windows SFTP mounting #992

Open
opened 2026-10-13 20:32:31 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Vadim000009 on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2231

Description

The current Windows SFTP drive mounting implementation uses SSHFS-Win (sshfs-win.exe), which has been abandoned since 2021. This causes multiple issues:

  1. Connection failures: SSHFS-Win's bundled SSH client (based on old Cygwin OpenSSH) cannot establish SFTP sessions with modern OpenSSH servers (9.2+), resulting in Connection reset by peer errors.
  2. Permission problems: Even when connections succeed, files created via SSHFS-Win have incorrect permissions, making them unreadable/uneditable from Windows.
  3. Stale mount points: Failed SSHFS-Win connections leave ghost drive letters that cannot be removed without a system reboot.
  4. No active maintenance: The SSHFS-Win project (https://github.com/winfsp/sshfs-win) has had no releases since 2021.

Current Behavior

  1. User enables SFTP in Amnezia client
  2. Amnezia calls sshfs-win.exe to mount the remote SFTP directory as a Windows drive
  3. Connection either hangs, resets, or succeeds but with broken read/write permissions
  4. Files can be written but cannot be opened or edited

Proposed Solution

Replace SSHFS-Win with rclone (https://rclone.org/) for SFTP drive mounting:

rclone mount sftp-remote:/upload Y: --vfs-cache-mode full

Why rclone:

  • Actively maintained: Regular releases, large community, extensive documentation
  • Modern SSH: Uses Go's crypto/ssh library — no compatibility issues with modern OpenSSH servers
  • Full read/write: --vfs-cache-mode full provides complete read/write access with local caching
  • Cross-platform: Works on Windows, macOS, Linux
  • WinFsp compatible: Uses the same WinFsp driver already required by the current implementation
  • No additional dependencies: Single binary, easy to bundle
  • Free and open-source: MIT license

Implementation approach:

  1. Bundle rclone.exe with the Windows Amnezia client (single ~50MB binary)
  2. When user enables SFTP, generate rclone config programmatically:
    [amnezia-sftp]
    type = sftp
    host = <server_address>
    port = 222
    user = sftp_user
    pass = <obscured_password>
    
  3. Mount using: rclone mount amnezia-sftp:/upload <drive_letter>: --vfs-cache-mode full --no-console
  4. Unmount using: rclone unmount <drive_letter>:

What can be removed:

  • sshfs-win.exe and all Cygwin DLLs (cygwin1.dll, cygglib-2.0-0.dll, etc.)
  • SSHFS-Win Manager / any SSHFS GUI wrappers
  • WinFsp dependency remains (rclone uses it too)

Testing performed

  • Tested on Windows 10 with Amnezia 4.8.12.9
  • Server: Debian 13 with updated amnezia-sftp container (OpenSSH 9.2p1)
  • rclone successfully mounts SFTP as drive with full read/write/delete access
  • KeePass database stored on mounted drive opens and saves correctly
  • No ghost mount issues on disconnect

Environment

  • Amnezia Client: 4.8.12.9 (Windows)
  • Server: Debian 13 (Trixie)
  • rclone tested version: latest stable
  • WinFsp: latest stable (required by both SSHFS-Win and rclone)
Originally created by @Vadim000009 on GitHub (Feb 17, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2231 ## Description The current Windows SFTP drive mounting implementation uses SSHFS-Win (`sshfs-win.exe`), which has been abandoned since 2021. This causes multiple issues: 1. **Connection failures**: SSHFS-Win's bundled SSH client (based on old Cygwin OpenSSH) cannot establish SFTP sessions with modern OpenSSH servers (9.2+), resulting in `Connection reset by peer` errors. 2. **Permission problems**: Even when connections succeed, files created via SSHFS-Win have incorrect permissions, making them unreadable/uneditable from Windows. 3. **Stale mount points**: Failed SSHFS-Win connections leave ghost drive letters that cannot be removed without a system reboot. 4. **No active maintenance**: The SSHFS-Win project (https://github.com/winfsp/sshfs-win) has had no releases since 2021. ## Current Behavior 1. User enables SFTP in Amnezia client 2. Amnezia calls `sshfs-win.exe` to mount the remote SFTP directory as a Windows drive 3. Connection either hangs, resets, or succeeds but with broken read/write permissions 4. Files can be written but cannot be opened or edited ## Proposed Solution Replace SSHFS-Win with **rclone** (https://rclone.org/) for SFTP drive mounting: ``` rclone mount sftp-remote:/upload Y: --vfs-cache-mode full ``` ### Why rclone: - **Actively maintained**: Regular releases, large community, extensive documentation - **Modern SSH**: Uses Go's `crypto/ssh` library — no compatibility issues with modern OpenSSH servers - **Full read/write**: `--vfs-cache-mode full` provides complete read/write access with local caching - **Cross-platform**: Works on Windows, macOS, Linux - **WinFsp compatible**: Uses the same WinFsp driver already required by the current implementation - **No additional dependencies**: Single binary, easy to bundle - **Free and open-source**: MIT license ### Implementation approach: 1. Bundle `rclone.exe` with the Windows Amnezia client (single ~50MB binary) 2. When user enables SFTP, generate rclone config programmatically: ```ini [amnezia-sftp] type = sftp host = <server_address> port = 222 user = sftp_user pass = <obscured_password> ``` 3. Mount using: `rclone mount amnezia-sftp:/upload <drive_letter>: --vfs-cache-mode full --no-console` 4. Unmount using: `rclone unmount <drive_letter>:` ### What can be removed: - `sshfs-win.exe` and all Cygwin DLLs (`cygwin1.dll`, `cygglib-2.0-0.dll`, etc.) - SSHFS-Win Manager / any SSHFS GUI wrappers - WinFsp dependency remains (rclone uses it too) ## Testing performed - Tested on Windows 10 with Amnezia 4.8.12.9 - Server: Debian 13 with updated amnezia-sftp container (OpenSSH 9.2p1) - rclone successfully mounts SFTP as drive with full read/write/delete access - KeePass database stored on mounted drive opens and saves correctly - No ghost mount issues on disconnect ## Environment - Amnezia Client: 4.8.12.9 (Windows) - Server: Debian 13 (Trixie) - rclone tested version: latest stable - WinFsp: latest stable (required by both SSHFS-Win and rclone)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#992
No description provided.