Connecting to course account using SSHFS on Windows

Step 1 - Install Cygwin

Download and install the latest version of Cygwin from here:

Download and open either setup-x86_64.exe or setup-x86.exe depending on whether your Windows is 64bit (x86_64) or 32bit (x86). If you aren't sure, right click the Start menu icon, then choose System. The "System Type" will tell you if you're using 64bit or 32bit. In this example, I'm using 64bit:


During the install, you can use the default settings for most of the steps.

On the Choose A Download Site step, you can just use the first option:


On the Select Packages step, install these packages:

  • procps-ng
  • openssh
  • libglib2.0_0

To install these packages, change the View to Full. Then search for procps-ng and set New column to be the latest version. Do this for all 3 packages before clicking Next button.




Step 2 - Install WinFsp

Download and install the latest version of WinFsp from here (download and open the .msi file):

When installing WinFsp, enable the "FUSE for Cygwin" feature:


Step 3 - Install SSHFS-Win

Download and install the latest version of SSHFS-Win from here:

Download either the x64 (64bit) or x86 (32bit) .msi file. When installing, you can just use the default settings.

Step 4 - Set up FUSE and SSHFS in Cygwin

Open a Cygwin window (ex. by searching for cygwin in the Windows search bar).

Run the install script that comes with WinFsp. Assuming you installed WinFsp at the default location, you would run this command:

sh '/cygdrive/c/Program Files (x86)/WinFsp/opt/cygfuse/'

This command should print "FUSE for Cygwin installed":


Next, use the cp command to create a copy of SSHFS-Win's sshfs.exe in Cygwin's /bin folder. If you installed SSHFS-Win at the default location on a 64bit Windows, the command would be:

cp '/cygdrive/c/Program Files/SSHFS-Win/bin/sshfs.exe' /bin


If you installed 32bit version of SSHFS-Win, you may have to use "Program Files (x86)" instead.

Step 5 - Mount accounts

This step will mount your own account and your courses' accounts on the desktop. To make the commands shorter, create a shortcut to the desktop in Cygwin:

ln -s /cygdrive/c/Users/`whoami`/Desktop

Then run this command to mount your own account (replace yourUserid with your own userid):

sshfs ~/Desktop/yourUserid -ouid=`id -u`,gid=`id -g`

If you're asked if you want to continue, enter "yes". If your password isn't working, try resetting your password.

If everything is successful, a folder will be created on the desktop that opens your account.

For example, my user ID is yc2lee, so I mount my account like this:


To mount your courses' accounts, run this command for each course (replace csNNN and yourUserid):

sshfs ~/Desktop/csNNN -ouid=`id -u`,gid=`id -g`,PreferredAuthentications=publickey,IdentityFile=~/Desktop/yourUserid/.ssh/id_rsa

In this example, I'm mounting the cs115ae course account (it's fine if you don't get asked for passphrase):


If you get the error "read: Connection reset by peer," you might not have access to the course account. Same if you see "Password:" and your password doesn't work. Ask your ISC or CSCF for access/help.

You can close the Cygwin window afterwards. The accounts will remain mounted.

To save time, you can copy-paste the sshfs commands you ran into a file (for example, with name Then run bash in Cygwin. This way, you won't have to type the commands each time you restart your PC.

Step 6 - Unmounting accounts

If you want to unmount an account, in a Cygwin window, run:

pkill -f 'sshfs.*accountName@'

For example, here I'm unmounting my yc2lee and cs115ae accounts:


If you want to unmount everything mounted with SSHFS, run: pkill sshfs

Like in Step 5, you can put these pkill commands in files to save typing.

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng CygwinChooseADownloadSite.png r1 manage 92.7 K 2020-01-09 - 10:59 YiLee Choosing a download site in Cygwin.
PNGpng CygwinCopySSHFSexe.png r1 manage 13.6 K 2020-01-09 - 10:31 YiLee Copying sshfs.exe into /bin folder
PNGpng CygwinInstallFUSE.png r1 manage 10.5 K 2020-01-09 - 10:30 YiLee Installing FUSE in Cygwin
PNGpng CygwinInstallLibglib.png r1 manage 92.6 K 2020-01-09 - 11:06 YiLee Installing libglib2.0_0 in Cygwin
PNGpng CygwinInstallOpenssh.png r1 manage 99.8 K 2020-01-09 - 11:05 YiLee Installing openssh in Cygwin
PNGpng CygwinInstallprocps-ng.png r1 manage 111.7 K 2020-01-09 - 11:04 YiLee Installing procps-ng in Cygwin
PNGpng CygwinMountCourseAccount.png r1 manage 35.3 K 2020-01-09 - 10:34 YiLee Mounting the course account with sshfs
PNGpng CygwinMountOwnAccount.png r1 manage 25.4 K 2020-01-09 - 10:33 YiLee Mounting your own account with sshfs
PNGpng CygwinUnmountAccounts.png r1 manage 10.1 K 2020-01-09 - 10:38 YiLee Unmounting sshfs in Cygwin
PNGpng WinFspCygwin.png r1 manage 113.4 K 2020-01-08 - 11:47 YiLee Enable "FUSE for Cygwin" when installing WinFsp
PNGpng Windows64or32bit.png r1 manage 237.1 K 2020-01-08 - 12:04 YiLee How to tell if Windows is x64/64bit or x86/32bit
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2020-09-03 - YiLee
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback