Mount FTP Or SFTP As A Drive In Windows

by Lalit Kapoor on 2008-06-292008-06-29T09:36:01ZY-m-d">June 29, 20082008-06-29T09:36:01ZF j, Y

Problem
I want to mount my folders from my webhost over sftp (ssh) on my Windows machine for free. Something like sshfs for Windows.

Discussion
Currently there is no single application that will let me mount an SFTP connection as a drive. There are however applications such as NetDrive, FTPDrive, etc which will let me mount an FTP connection as a drive. So all that’s left to do is create a FTP to SFTP bridge. What does that do you ask? That creates a FTP proxy to your SFTP connection. It will allow you to send your commands from the FTP server to the SFTP connection. There are two tools that stand out to create the bridge we need. The first is mindTerm, an open source solution written purely in java. The second is Tunnelier by Bitvise. I will be using mindTerm with NetDrive in my solution. If you have success with any other combination feel free to comment about your setup.

Solution

  1. Download and extract mindTerm
  2. Run mindterm.jar (double click it if you can, otherwise in command prompt type in java -jar mindterm.jar)
  3. Type in the host you want to ssh into followed by the username and password
  4. In the menu click on Plugins>FTP To SFTP Bridge…
  5. Type in 127.0.0.1 for the Listen address
  6. Type in  21 for the Listen port
  7. Select the Remote system type
  8. Click Enable
  9. Click Dismiss
  10. Next we want to install NetDrive
  11. Once netdrive is installed, open it up, and click New Site on the bottom
  12. Type in localhost (or whatever you want to call it) for the Site name
  13. Type in localhost for the Site IP
  14. Type in 21 for the Port
  15. Select FTP for the Port
  16. Select a Drive letter
  17. Check Connect as anonymous
  18. Click Save
  19. Click Connect
  20. Click the X to close the window (will minimize to system tray)

There you have it! A SSH/SFTP connection as a drive in Windows. I have tested it in Windows Vista, however it should work just fine in Windows XP.

{ 1 trackback }

Bookmarks about Sftp
August 30, 20082008-08-30T14:01:40ZF j, Y at 10:01 am2008-08-30T14:01:40Zg:i a

{ 15 comments… read them below or add one }

1 pic.micro23 June 30, 20082008-06-30T12:28:37ZF j, Y at 8:28 am2008-06-30T12:28:37Zg:i a

Not a free solution($29usd) but sftpdrive.com has what you need with a simple installation.

Reply

2 Lalit Kapoor June 30, 20082008-06-30T18:56:50ZF j, Y at 2:56 pm2008-06-30T18:56:50Zg:i a

@pic.micro23: Actually, I had tried that a few months ago, but found it to be quite buggy. If they have released a new version I will give it another shot.

Reply

3 Jared July 12, 20082008-07-13T00:24:12ZF j, Y at 8:24 pm2008-07-13T00:24:12Zg:i a

This is discontinued, but it looks like it might do what you’re looking for:

http://www.jscape.com./reddrive

Windows doesn’t appear to treat it exactly like a real drive (for instance, no letter assignment), but for most purposes I suspect it would be fine. (I tried it in XP.)

Reply

4 StephenB. October 6, 20082008-10-07T01:55:31ZF j, Y at 9:55 pm2008-10-07T01:55:31Zg:i a

Hey,

Came across this site through Google, shortly before I found another way to do the same thing:

http://dokan-dev.net/en/download/

With the Dokan Library + the SSHFS component, it appears to let you directly mount a filesystem via SSH (also seems to be open source).

Reply

5 cb November 12, 20082008-11-12T14:47:06ZF j, Y at 10:47 am2008-11-12T14:47:06Zg:i a

Dokan lib + SSHFS works quite nicely but ignores logical links on Linux. Hopefully that will be changed in a future release.

Reply

6 me April 28, 20092009-04-28T16:53:49ZF j, Y at 12:53 pm2009-04-28T16:53:49Zg:i a

netdrive itself can access an sftp-server.
- in the ‘advanced’ section you can choose ’sftp’

Reply

7 Siva June 10, 20092009-06-10T18:01:43ZF j, Y at 2:01 pm2009-06-10T18:01:43Zg:i a

Tried this, but still the password is sent in plain text.

Reply

8 Siva June 10, 20092009-06-10T18:03:29ZF j, Y at 2:03 pm2009-06-10T18:03:29Zg:i a

netdrive has the sftp(ssh) option in advanced section, i tested (winxp sp3) that and its totally unstable

Reply

9 Lalit Kapoor June 11, 20092009-06-11T04:47:25ZF j, Y at 12:47 am2009-06-11T04:47:25Zg:i a

Siva: StephenB’s comment may be the best alternative.

Reply

10 Stephanie July 3, 20092009-07-03T16:01:06ZF j, Y at 12:01 pm2009-07-03T16:01:06Zg:i a

Thank you so much! This worked perfectly for my needs.

Reply

11 Edouard September 5, 20092009-09-05T19:47:32ZF j, Y at 3:47 pm2009-09-05T19:47:32Zg:i a

Hi,
I tested your solution and it works like a charm. The only problem (but important to me) is that it mount the driver on the user home folder of my server (/home/user/) when I would like to mount it on /home/samba-shared/
Is there a way to change remote default directory.
I tried module.sftp.cwd-remote=/home/samba-shared/ but it seems not to work ?

Reply

12 Edouard September 5, 20092009-09-05T22:21:44ZF j, Y at 6:21 pm2009-09-05T22:21:44Zg:i a

Hi again,
Solution is simply to change de default folder of the user in /etc/passw file
Is there a way to automate all this in a windows bash script ?

Reply

13 Lalit Kapoor September 5, 20092009-09-05T23:28:57ZF j, Y at 7:28 pm2009-09-05T23:28:57Zg:i a

Eduard,
Take a look at what Stephen B. said above in the comments, you may want to give this a try: http://dokan-dev.net/en/download/

Reply

14 detrol online September 15, 20092009-09-15T10:08:52ZF j, Y at 6:08 am2009-09-15T10:08:52Zg:i a

That`s all.
—————————————
signature: generic lexapro

Reply

15 L Sco October 3, 20092009-10-03T06:33:27ZF j, Y at 2:33 am2009-10-03T06:33:27Zg:i a

Hello all

I have just tried Dokan and compared it to SFTPdrive. Dokan works fine except for how excruciatingly SLOW it is. When it takes 20 seconds to return a directory listing you can spend minutes just getting to a directory 3 levels down.

SFTPdrive or ExpanDrive (new name) is quite snappy in comparison, even at the 1.7.9 version I have.

Hope that helps someone.

L

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: