Everything you need for SSHFS on Windows 10 and 11: what WinFsp and SSHFS-Win do, how to map a drive with Explorer, net use or a GUI, which sshfs.exe options really matter – and how to fix typical errors such as zero-byte files or folders that show up late.
SSHFS (SSH Filesystem) mounts a folder on a remote server as a local file system over an ordinary SSH connection. Every file operation goes through SFTP, the file transfer subsystem of SSH. All you need on the server is an SSH login with SFTP enabled (the default in OpenSSH) – no extra server software and no open SMB port. On Windows, two free open-source components do the work: WinFsp and SSHFS-Win.
sshfs.exe together with its own SSH client and connects WinFsp to the SFTP server.Install WinFsp first and SSHFS-Win second. Both are free MSI installers on GitHub; installing them needs administrator rights once. On 64-bit Windows, pick the x64 package of SSHFS-Win. Connecting and disconnecting drives later works without administrator rights.
In NEO SSH-Win Manager, add a connection: host, port (usually 22), user name and the remote path that should become the root of the drive – for example /var/www, or C:\Projects on a Windows server. Choose password or SSH key authentication and a drive letter, or let the app pick a free one. Credentials are stored encrypted with a key derived from your app password.
Clicking “Mount” starts sshfs.exe in the background, and a few seconds later the server appears as a drive in File Explorer – usable from any program, including editors, IDEs and build tools. With “Auto-reconnect on connection loss” the drive comes back after network interruptions. With “Start with Windows” and “Auto-connect on start” your drives are back after you sign in.
SSHFS-Win registers itself as a network provider in Windows. That's why you can map a drive directly in File Explorer (This PC → Map network drive) or in a command prompt with net use. The first time, Windows asks for the password and can save it in Credential Manager.
net use X: \\sshfs\alice@server.example.com
net use Y: \\sshfs.r\alice@server.example.com!2222\var\www
net use X: /delete
The general form is \\sshfs\USER@HOST[!PORT][\PATH]. The prefix decides where the path starts and how you sign in:
| Prefix | Meaning |
|---|---|
\\sshfs\ | Path relative to the user's home directory, password login |
\\sshfs.r\ | Path relative to the server's root directory (/), password login |
\\sshfs.k\ | Home directory, login with the key %USERPROFILE%\.ssh\id_rsa |
\\sshfs.kr\ | Root directory, login with the key %USERPROFILE%\.ssh\id_rsa |
That's enough for occasional access, but this approach has limits: the key variants only use id_rsa and only keys without a passphrase (other keys need a host alias in the SSH config), automatic reconnects can't be configured, and every drive has to be maintained separately for each user.
Instead of going through net use, you can call sshfs.exe from C:\Program Files\SSHFS-Win\bin yourself. This is what NEO SSH-Win Manager does in the background, because it gives full control over reconnects, caches and permissions. Run the command in that folder, since sshfs.exe needs the ssh.exe next to it. With -f the process stays in the foreground, and the drive exists as long as it runs. The example is a shortened version of the options the app uses:
cd "C:\Program Files\SSHFS-Win\bin"
sshfs.exe alice@server.example.com:/var/www X: -p22 -f ^
-ovolname=web -oreconnect ^
-oServerAliveInterval=15 -oServerAliveCountMax=3 ^
-oStrictHostKeyChecking=accept-new ^
-oUserKnownHostsFile=C:/Users/alice/.ssh/known_hosts ^
-oidmap=user -ouid=-1 -ogid=-1 -oumask=000 ^
-oFileInfoTimeout=1000 -oDirInfoTimeout=1000 -odcache_dir_timeout=1 ^
-oIdentityFile=C:/Users/alice/.ssh/id_ed25519
| Option | Purpose |
|---|---|
-oreconnect-oServerAliveInterval=15-oServerAliveCountMax=3 | Reconnects automatically. A dead connection is detected after about 45 seconds instead of freezing File Explorer. |
-oStrictHostKeyChecking=accept-new-oUserKnownHostsFile=… | Adds the host key of a new server to known_hosts on the first connection. A changed key of a known server is still rejected. Give the path to the file as an absolute path, because sshfs does not expand %USERPROFILE%. |
-oidmap=user-ouid=-1 -ogid=-1-oumask=000 | Maps the files to your Windows user and shows them as writable, so programs don't give up before saving. What you are actually allowed to write is still decided by the permissions on the server. |
-oFileInfoTimeout=1000 | Caches file metadata for one second. Never use -1: it turns on data caching and can lead to files that contain only zero bytes (see below). |
-oDirInfoTimeout=1000-odcache_dir_timeout=1 | Keeps directory listings fresh, so new files appear after about one second instead of 20 seconds. |
-oIdentityFile=… | Uses any OpenSSH key (e.g. ed25519) instead of only id_rsa. For password logins, NEO SSH-Win Manager passes the password via -opassword_stdin, so it never appears on the command line. |
-ovolname=web | Name of the drive in File Explorer. |
This is the most treacherous SSHFS error. When a file is created or overwritten, sshfs first sets the file on the server to its final size – the SFTP server fills that area with zeros – while the real data still sits in a write cache. With -oFileInfoTimeout=-1, WinFsp treats this intermediate state as valid indefinitely and can return the zeros when the file is read back. If sshfs.exe is also killed hard during unmount, data that hasn't been written yet is lost. Fix: use a finite value such as -oFileInfoTimeout=1000, add -osshfs_sync and -ono_readahead for synchronous writes and reads, and always disconnect drives cleanly. NEO SSH-Win Manager uses these safe settings by default.
Below the WinFsp cache, sshfs keeps its own directory cache. Its default dcache_dir_timeout is 20 seconds, and pressing F5 in File Explorer doesn't help because sshfs keeps answering from that cache. Fix: -odcache_dir_timeout=1 together with -oDirInfoTimeout=1000, or turn the directory cache off completely with -odir_cache=no. In NEO SSH-Win Manager this is the setting “Disable directory cache (instant refresh)”.
On a server running OpenSSH for Windows, the SFTP root “/” lists the drive letters (/C:, /D:). Because a colon isn't allowed in Windows file names, File Explorer shows them as “C” and “D”. Mount a concrete path instead – C:\Projects becomes /C:/Projects – or the user's home directory. NEO SSH-Win Manager detects Windows servers and converts such paths automatically.
Windows can't map the server's Unix owners and permission bits one to one. Without -oidmap=user and a suitable umask, files look read-only or foreign to Windows programs. If the error persists, check the permissions on the server itself (ls -l): SSHFS can never allow more than the SSH user may do.
Without keep-alive, a broken connection is only noticed after a long TCP timeout, and File Explorer freezes. -oServerAliveInterval=15 -oServerAliveCountMax=3 together with -oreconnect detects it after about 45 seconds and reconnects. Drives left over after a crash can be removed with net use X: /delete. NEO SSH-Win Manager cleans up such ghost drives automatically.
If sshfs reports “REMOTE HOST IDENTIFICATION HAS CHANGED”, the host key of a known server has changed, for example after a reinstall. Verify this with the server's operator, then remove the old entry from %USERPROFILE%\.ssh\known_hosts, for example with ssh-keygen -R host. Keys must be in OpenSSH format: convert PuTTY keys (.ppk) with PuTTYgen via “Conversions → Export OpenSSH key”.
SSHFS is ideal when you want to work on server files with Windows programs as if they were local: editing code in an IDE, maintaining web projects, opening logs and configuration files. For moving large amounts of data, a direct SFTP transfer or rsync is faster, because every file operation over SSHFS is a network round trip. On a company network, SMB is often quicker but needs an open file-sharing port – SSHFS only needs SSH.
SSHFS vs. SFTP vs. SMB compared
Yes. WinFsp and SSHFS-Win are open source and free to use. NEO SSH-Win Manager is free and open source as well (MIT license).
Yes. WinFsp and SSHFS-Win run on Windows 10 and 11, and NEO SSH-Win Manager supports both versions.
Only once, to install WinFsp and SSHFS-Win. Connecting and disconnecting drives works as a normal user.
Yes, if the OpenSSH server is enabled on it. Mount a concrete path such as C:\Projects instead of the root directory (see above). NEO SSH-Win Manager supports Windows servers since version 1.6.0.
All data travels encrypted over SSH, with the same authentication as your SSH login (password or key). The server only needs its SSH port to be reachable.