Mount remote filesystems via SSH on Windows with free software
I often use Windows as a terminal to my various UNIX systems. Sometimes its helpful to run proprietary software – and I don’t have time/inclination to mess around with half-baked emulators/ports/binary blobs/whatevers under Linux. I either run a completely open system like OpenBSD or I run Windows.
Anyway, I never use Windows to do any real work. I always shell into a remote system to actually get things done. Either PuTTY or – if you prefer real OpenSSH like me – OpenSSH via Cygwin/X work fine for getting a terminal. WinSCP or Cygwin’s OpenSSH for scp(1) are good for file-transfer under most circumstances. However, one of the nice things about Windows is the Explorer shell. It – and its KDE knock-off – are useful for certain file management operations. Why not leverage it?
So I started looking for a way to mount remote filesystems via SSH, so that they appear as native Windows volumes. And I found a way to do it, for free.
Dokan user mode filesystem for Windows
Dokan is basically FUSE for Windows. That’s all dandy and there are plenty of useful FUSE filesystems out there, like this one which uses my BitTorrent implementation. Whats cool about Dokan is they also do an SSH FS implementation.
Is it hard to set up
I figured this thing was surely going to be a PITA and probably not work to boot. In fact, you just install three things – some Microsoft runtime library, the main Dokan library, and Dokan SSHFS – and there you go. There is simple GUI app to set up remote mounts that supports all the things you’d expect, saving sessions, both password and public key authentication.
Does it actually work
Yes, although it doesn’t seem to support symlinks. A symlink to a directory on a remote system appears as a file under Dokan. So no $HOME/public_html for you – oh well.
Final thoughts
Its fun to look at your horribly un-organised UNIX home directory in Windows, and see just how messy it is. Almost makes me want to start cleaning things up. But then I remember I know how to use locate(1) and find(1).









I was just about to go looking for something that does ssh filesystem mounting on Windows when I saw your status update announcing this post. Very handy!
The thing is the more you play with virtual filesystems (as a programmer), especially Dokan, the more you wish your where using a Unix system (and FUSE). Dokan is a very good piece of work, but Windows just doesn’t really cut it for virtual filesystems. If you get the “everything is a file” of Unix and wish it was taken as far as Plan9, Windows is a broken toy. In fact it’s worse, things that should be simple are made complex. Don’t get me started about mounting under Windows. As for the Explorer shell, try writing a full namespace for your virtual filesystem then say it’s good. There is a lack of documentation, what there is was forced out of MS by the EU in 2003. It’s a nightmare. Wine source will help some, but doesn’t implement everything and not always in the same way. I’ve been working on all this for months and it’s horrible, it’s like trying to make a dog sing.
Joe,
While I haven’t worked with Windows’ virtual filesystem stuff, I can certainly imagine its horrible. I’m sure that POSIX is a lot nicer. You only have to look at how symlinks are supported under Windows to get a taste of the horrors of the Windows API.
On the other hand, the Explorer interface is quite nice for file management. Not that they necessarily originated it, or that there aren’t good copies for UNIX systems (Konqueror, or ROX Filer).
It’s worse than you think. There is a separate underworld (NT kernel) filesystem which does have proper symlinks. You can access this underworld files system with all the normal file commands, but it’s a separate system of objects/device. Then of course there is the registry, which again kind is a filesystem without really being a file system. Then in Explorer there are namespaces which are kind of like filesystem to the user, but doesn’t have real paths that can be used with file functions. Unix has it right, everything is a file in a single hierarchy with mounting and symlinks available everywhere as standard. Same file commands/functions for everything. Just wish it was taken as far as Plan9, but there is hope in Glendix, and the Proc and Union filesystems are from Plan9. Dokan makes some of the world of virtual filesystem easier to move into the Windows world, but if your really interested in filesystem, Windows is not the platform for you.
The Explorer interface is ok as a file manager, if you’re not developing for it, for users it does the job. Though even a normal user will suffer from all Explorer windows (and task bar) being a single process. Sooo many times I’ve see people think Windows has crashed when it’s just Explorer locking up over some problem drive or something.