tags:

views:

15499

answers:

13

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.

+1  A: 

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.

Michael Haren
SSH tunnels with PuTTy really aren't that bad. It'll automatically initiate the tunnel when you connect. If you set it to run on startup and use private-key login with no passphrase (warning, not secure!!!), you'll immediately be ready to go.
yes, I agree. It's just a little involved to get setup. At least compared with Windows-Windows sharing.
Michael Haren
I'd rather not set up samba since it's an extra step the rest of the class won't use. Also I trust SSH more then Samba and the campus network isn't what I'd call secure considering how many students are on it with personal computers running god knows what.
Jared
Jared: if you went with samba, you'd have to tunnel it through SSH anyway--so it'd be equally safe as ssh. If you really want an easy drag-drop method, then WinSCP is nice, as suggested by others.
Michael Haren
+6  A: 

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

Vinko Vrsalovic
Works for me, albeit a bit slowly.
bobince
+1 works just as expected
xkcd150
-1, costs $39 when you can do it better than that for $0
Quandary
@Quandary: Better according to what parameters? This tool is exactly what the OP asked for (full windows integration).
Vinko Vrsalovic
@Vinko Vrsalovic: It probably does, but all he needs is mounting a remote drive in explorer via ssh. And Dokan does that (full windows integration) including RSA keys, and it's free and opensource. I wouldn't go as far as to say that sftpdrive is probably nothing more than dokan compiled to another name ignoring the GPL, and perhaps even with at least one additional feature, but ...
Quandary
@Quandary: Since when does it do all that?
Vinko Vrsalovic
@Vinko Vrsalovic: Since longer, don't know the exact date. Just that it didn't work error free on x64 until about something like half a year ago. The better question is how do you create an RSA key on windows, but there, gitbash @ google-code to the rescue.
Quandary
@Quandary: Great. Last time I tried it it didn't do all that.
Vinko Vrsalovic
A: 

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 :)

Stefano Driussi
+4  A: 

You can try WinSCP, it supports sftp connections. I think it even has an explorer integration.

Also, 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. See here: http://www.novell.com/coolsolutions/qna/999.html 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.

Sunny
Second :(. Anyway, the explorer integration worths mentioning.
Sunny
Netdrive 4.1 doesn't seem to handle sftp
rpilkey
A: 

Look at this question: map-ssh-drive-in-windows which already covers a similar area.

SSH isn't a file access protocol so you have to define what you want and what you have available.

Douglas Leeder
+9  A: 

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.

matli
Good find! Sounds like a real treat. Shame that the SSHFS component isn't Free like the rest of the package; it would really simplify things at work. :-)
Ben Blank
Currently SSHFS doesn't work on x64.
Sorin Sbarnea
I'd just wish dokan sshfs would talk to pageant to get the private key... otherwise it seems to work
Bruno Lopes
Just installed the latest DOkan requirements as of today, and it keeps crashing when I attempt to connect using an OpenSSH key pair.
dandv
@ Sorin Sbarnea: Was true, but is not true anymore.
Quandary
+3  A: 

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/

neesh
A: 

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

Alnitak
+1  A: 

check out Dokan

http://dokan-dev.net/en

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

A: 

I've tried ExpanDrive, It's very useful when you can't afford your self SAMBA/CIFS on *NIX Server. So don't hestiate to use It...

Fratyr
A: 

If you're running XP-SP3 or Windows 7, check out this tutorial: http://alirezabagheri.com/blog/?p=67

David
A: 

If you have a decent system, why not practice what you're trying to achieve locally with VirtualBox? Then you could access a local Samba through the loopback.

Xaekai
A: 

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.

Leo