The Computer Oracle

Getting `sshfs` working on WSL or finding an alternative

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Digital Sunset Looping

--

Chapters
00:00 Getting `Sshfs` Working On Wsl Or Finding An Alternative
01:20 Answer 1 Score 14
02:02 Accepted Answer Score 10
02:28 Thank you

--

Full question
https://superuser.com/questions/1353169/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#filesystems #sftp #windowssubsystemforlinux #sshfs #fuse

#avk47



ANSWER 1

Score 14


So I have a workaround that you might like. I installed SFTP Net Drive 2017 and then remotely connected to the file system I wanted. I mapped it (via the GUI) as R:\. From WSL, you can then map R:\ to a local folder as explained here.

So in WSL, I have a folder in my home directory called cluster. To mount it to be my local home from my cluster, I run:

sudo mount -t drvfs R: ~/cluster

and to unmount it, I run

umount ~/cluster

for convenience, I made an alias called mc, sourced it from my .bashrc

alias mc="sudo umount ~/cluster; sudo mount -t drvfs R: ~/cluster"

I hope this helps!




ACCEPTED ANSWER

Score 10


Since I asked this question, Microsoft has released WSL 2 in its Insiders Preview ring. Since this provides a full Linux kernel to WSL, no more workarounds are necessary to get SSHFS to work.

Update: WSL 2 is now publicly available as of Windows version 2004. Have fun!