How do I mount a remote Linux folder in Windows through SSH?

LinuxShellSsh

Linux Problem Overview


I'm a blind student currently in a system admin/shell programming class. Although ssh works fine for executing commands like ls, pwd, etc editors do not work well with my screen reader and an ssh session. I was wondering if it is possible to mount a Linux folder over ssh so it appears as a windows drive? This way I could edit any files I needed to with accessible software and not have to constantly use SCP to send files back and fourth.

Linux Solutions


Solution 1 - Linux

Back in 2002, Novell developed some software called NetDrive that can map a WebDAV, FTP, SFTP, etc. share to a windows drive letter. It is now abandonware, so it's no longer maintained (and not available on the Novell website), but it's free to use. I found quite a few available to download by searching for "netdrive.exe" I actually downloaded a few and compared their md5sums to make sure that I was getting a common (and hopefully safe) version.

Update 10 Nov 2017 SFTPNetDrive is the current project from the original netdrive project. And they made it free for personal use:

> We Made SFTP Net Drive FREE for Personal Use

They have paid options as well on the website.

Solution 2 - Linux

Dokan looks like a FUSE and sshfs implementation for Windows. If it works as expected and advertised, it would do exactly what you are looking for.

(Link updated and working 2015-10-15)

Solution 3 - Linux

The best an easiest solution I found is https://github.com/billziss-gh/sshfs-win, connected servers shows up as a fully functioning network drives. This is not a 'Dokany' or 'dokan' based solution which from experiance seems more stable and performant, also see WinFsp Performance Testing.

mount ssh on windows

Please note previously this answer stated, https://github.com/Foreveryone-cz/win-sshfs and before that http://www.swish-sftp.org/ but I no longer use any of them, first one stopped working second one created drives not fully supported in all programs.

Solution 4 - Linux

Another, more Windows-y option (for $39) is http://www.expandrive.com/sftpdrive

Solution 5 - Linux

Take a look at CIFS (http://www.samba.org/cifs/). It is a virtual file system you can run on your linux machine that will allow you to mount folders on your linux machine in windows using SMB.

CIFS on linux information can be found here: http://linux-cifs.samba.org/

Solution 6 - Linux

You need to mount a remote share on your windows machine. This is what Samba/smb is for.

What you'll be doing is turning your Linux box into an SMB server, which lets it share files in a way that plays nice with Windows.

If you're not on the same network, you'll need to tunnel this through your SSH connection which may not be worth the effort.

Solution 7 - Linux

check out Dokan

https://dokan-dev.github.io/

it's iffy, but it works, and it's free

Solution 8 - Linux

I don't think you can mount a Linux folder as a network drive under windows having only access to ssh. I can suggest you to use WinSCP that allows you to transfer file through ssh and it's free.

EDIT: well, sorry. Vinko posted before me and now i've learned a new thing :)

Solution 9 - Linux

Apparently the free NetDrive software from Novell can access SFTP file servers.

Solution 10 - Linux

Second David's answer below: I needed to mount a network drive automatically when users logged in. Dokan SSHFS is a nice tool, but wasn't reliable enough in this case. The copy of Netdrive I found didn't support SSHFS or sftp - not sure if a more recent one does.

The solution I'm trialling now involves adding a virtual network adapter (with file sharing disabled), using plink to open a tunnel via the new adapter to the remote machine running SAMBA, and mounting the network drive against the new adapter. There's another useful tutorial here http://www.blisstonia.com/eolson/notes/smboverssh.php.

The tunnel and network drive can be set up with a login script, so a few seconds after login users can use the mapped drive without needing to take any action.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJaredView Question on Stackoverflow
Solution 1 - LinuxSunny MilenovView Answer on Stackoverflow
Solution 2 - LinuxmatliView Answer on Stackoverflow
Solution 3 - LinuxDaniel SokolowskiView Answer on Stackoverflow
Solution 4 - LinuxVinko VrsalovicView Answer on Stackoverflow
Solution 5 - LinuxneeshView Answer on Stackoverflow
Solution 6 - LinuxMichael HarenView Answer on Stackoverflow
Solution 7 - LinuxView Answer on Stackoverflow
Solution 8 - LinuxStefano DriussiView Answer on Stackoverflow
Solution 9 - LinuxAlnitakView Answer on Stackoverflow
Solution 10 - LinuxLeoView Answer on Stackoverflow