SSHFS-Win · SSHFS for Windows
- Install the latest version of WinFsp.
- Install the latest version of SSHFS-Win. Choose the x64 or x86 installer according to your computer's architecture.
Once you have installed WinFsp and SSHFS-Win you can map a network drive to a directory on an SSHFS host using Windows Explorer or the
net use command.
In Windows Explorer select This PC > Map Network Drive and enter the desired drive letter and SSHFS path using the following UNC syntax:
The first time you map a particular SSHFS path you will be prompted for the SSHFS username and password. You may choose to save these credentials with the Windows Credential Manager in which case you will not be prompted again.
In order to unmap the drive, right-click on the drive icon in Windows Explorer and select Disconnect.
You can map a network drive from the command line using the
net use command:
> net use X: \\sshfs\email@example.com The password is invalid for \\sshfs\firstname.lastname@example.org. Enter the user name for 'sshfs': billziss Enter the password for sshfs: The command completed successfully.
You can list your
net use drives:
$ net use New connections will be remembered. Status Local Remote Network ------------------------------------------------------------------------------- X: \\sshfs\email@example.com WinFsp.Np The command completed successfully.
Finally you can unmap the drive as follows:
$ net use X: /delete X: was deleted successfully.
The complete UNC syntax is as follows:
\\sshfs\[LOCUSER=]REMUSER@HOST[!PORT][\PATH] \\sshfs.r\[LOCUSER=]REMUSER@HOST[!PORT][\PATH] \\sshfs.k\[LOCUSER=]REMUSER@HOST[!PORT][\PATH]
REMUSERis the remote user (i.e. the user on the SSHFS host whose credentials are being used for access).
HOSTis the SSHFS host.
PORTis the remote port on the SSHFS host (optional; default is 22).
PATHis the remote path. This is interpreted as follows:
sshfsprefix maps to
HOST:~REMUSER/PATHon the SSHFS host (i.e. relative to
REMUSER's home directory).
sshfs.rprefix maps to
HOST:/PATHon the SSHFS host (i.e. relative to the
HOST's root directory).
sshfs.kprefix maps to
HOST:~REMUSER/PATHand uses the ssh key in
%USERPROFILE%is the home directory of the local Windows user).
LOCUSERis the local Windows user (optional;
- Please note that this functionality is rarely necessary with latest versions of WinFsp.
GUI front ends
SiriKali is a GUI front end for SSHFS-Win (and other file systems). Instructions on setting up SiriKali for SSHFS-Win can be found at this link. Please report problems with SiriKali in its issues page.
- Password authentication.
- Key Agents and KeePass 2.
- Public key authentication.
It is possible to use the
sshfs.exe programs directly for advanced usage scenarios. Both programs can be found in the
bin subdirectory of the
SSHFS-Win installation (usually
sshfs-win.exe program is useful to launch
sshfs.exe from a
cmd.exe prompt (
sshfs-win cmd) or to launch
sshfs.exe under the control of the WinFsp Launcher (
sshfs-win svc). The
sshfs-win.exe program SHOULD NOT be used from Cygwin. The
sshfs-win.exe program has the following usage:
usage: sshfs-win cmd SSHFS_COMMAND_LINE SSHFS_COMMAND_LINE command line to pass to sshfs usage: sshfs-win svc PREFIX X: [LOCUSER] [SSHFS_OPTIONS] PREFIX Windows UNC prefix (note single backslash) \sshfs[.r|.k]\[LOCUSER=]REMUSER@HOST[!PORT][\PATH] sshfs: remote home; sshfs.r: remote root sshfs.k: remote home with key authentication LOCUSER local user (DOMAIN+USERNAME) REMUSER remote user HOST remote host PORT remote port PATH remote path (relative to remote home or root) X: mount drive SSHFS_OPTIONS additional options to pass to SSHFS
sshfs.exe program can be used with an existing Cygwin installation, but it requires prior installation of FUSE for Cygwin on that Cygwin installation. FUSE for Cygwin is included with WinFsp and can be installed on a Cygwin installation by executing the command:
$ sh WINFSP_INSTALL_DIR/opt/cygfuse/install.sh FUSE for Cygwin installed.
This is a simple project:
sshfsis a submodule pointing to the original SSHFS project.
sshfs-win.cis a simple wrapper around the sshfs program that is used to implement the "Map Network Drive" functionality.
sshfs-win.wxsis a the Wix file that describes the SSHFS-Win installer.
patchesis a directory with a couple of simple patches over SSHFS.
Makefiledrives the overall process of building SSHFS-Win and packaging it into an MSI.
SSHFS-Win uses the same license as SSHFS, which is GPLv2+. It interfaces with WinFsp which is GPLv3 with a FLOSS exception.
It also packages the following components:
- Cygwin: LGPLv3
- GLib2: LGPLv2
- SSH: "all components are under a BSD licence, or a licence more free than that"