Download and install the latest version of Cygwin from here:
https://cygwin.com/install.html
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:
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.
Download and install the latest version of WinFsp from here (download and open the .msi file):
https://github.com/billziss-gh/winfsp/releases
When installing WinFsp, enable the "FUSE for Cygwin" feature:
Download and install the latest version of SSHFS-Win from here:
https://github.com/billziss-gh/sshfs-win/releases
Download either the x64 (64bit) or x86 (32bit) .msi file. When installing, you can just use the default settings.
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/install.sh'
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.
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 yourUserid@linux.student.cs.uwaterloo.ca: ~/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 csNNN@linux.student.cs.uwaterloo.ca: ~/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 mount-sshfs.sh). Then run bash mount-sshfs.sh in Cygwin. This way, you won't have to type the commands each time you restart your PC.
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.
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
CygwinChooseADownloadSite.png | r1 | manage | 92.7 K | 2020-01-09 - 10:59 | YiLee | Choosing a download site in Cygwin. |
![]() |
CygwinCopySSHFSexe.png | r1 | manage | 13.6 K | 2020-01-09 - 10:31 | YiLee | Copying sshfs.exe into /bin folder |
![]() |
CygwinInstallFUSE.png | r1 | manage | 10.5 K | 2020-01-09 - 10:30 | YiLee | Installing FUSE in Cygwin |
![]() |
CygwinInstallLibglib.png | r1 | manage | 92.6 K | 2020-01-09 - 11:06 | YiLee | Installing libglib2.0_0 in Cygwin |
![]() |
CygwinInstallOpenssh.png | r1 | manage | 99.8 K | 2020-01-09 - 11:05 | YiLee | Installing openssh in Cygwin |
![]() |
CygwinInstallprocps-ng.png | r1 | manage | 111.7 K | 2020-01-09 - 11:04 | YiLee | Installing procps-ng in Cygwin |
![]() |
CygwinMountCourseAccount.png | r1 | manage | 35.3 K | 2020-01-09 - 10:34 | YiLee | Mounting the course account with sshfs |
![]() |
CygwinMountOwnAccount.png | r1 | manage | 25.4 K | 2020-01-09 - 10:33 | YiLee | Mounting your own account with sshfs |
![]() |
CygwinUnmountAccounts.png | r1 | manage | 10.1 K | 2020-01-09 - 10:38 | YiLee | Unmounting sshfs in Cygwin |
![]() |
WinFspCygwin.png | r1 | manage | 113.4 K | 2020-01-08 - 11:47 | YiLee | Enable "FUSE for Cygwin" when installing WinFsp |
![]() |
Windows64or32bit.png | r1 | manage | 237.1 K | 2020-01-08 - 12:04 | YiLee | How to tell if Windows is x64/64bit or x86/32bit |