Mount an SSH Connection in OS X

January 30, 2007

Google’s Amit Singh released MacFUSE, a Mac-centric interpretation of FUSE. From the project website:

MacFUSE implements a mechanism that makes it possible to implement a fully functional file system in a user-space program on Mac OS X (10.4 and above). It aims to be API-compliant with the FUSE (File-system in USErspace) mechanism that originated on Linux.

The implications of this are pretty dramatic. For example, you can mount an RSS feeds as if it were a filesystem, allowing you to view the entries as separate files. Opening a “file” in this example would open the URL of the entry in your browser.

The functionality that I’m interested in most is being able to mount an SSH connection. Any SSH accessible server is compatible, as far as I can tell, and Google’s Mac version of “sshfs” makes it dead simple.

First, download and install the latest version of MacFUSE. This requires a restart and doesn’t really warn you very well. At least it lets you hit the “restart” button when you’re ready.

Secondly, download “sshfs” from the same page and drag it to your /Applications directory. Open up the application and it brings up a dialog box requesting the Server (hostname or IP), Username and option Remote Directory (the directory you want to start your session in).

Then, unsurprisingly, it’ll ask you for a password. As of the current version “sshfs” does not notify the user if the connection failed.

If you were successful you’ll see your files on the other side of the SSH connection.


Comments

Yeah! I saw it today... and: it works like magic!!! ;-). BUT: i want to see the filesysem mounted when i'm booting osx... after all, macfuse is an app more, thus not efficient enought. maybe automator will help.

Posted by Jan

If you want to mount at the start read this
http://www.lacy.ie/macfuse-mounting-n...

Posted by ArchDukeFranz

Excellent!

What about support for those of us who use keys for ssh, and not password authentication?

Posted by Brian Aker

Brian, I believe you won't be asked for your password if your keys match properly.

Posted by SuperJared

Nice work, thanks!

first time you connect to an host, before you use this sshfs you have to manually do a terminal ssh, to handle "permanent adding to known hosts" interactive ssh behaviour.

Posted by DrBourbon

Hi, can anybody tell me if there is a possibility to mount an ssh connection, which does not run via port 22? I've configured my sshd to run on a different port, but didn't find a solution, to specify an another port than 22.

Posted by Sven Gerlach

Try adding the port so ~/.ssh/config

Posted by SuperJared

Wow, cool! ... Thanks for the tip. :)

Posted by Sven Gerlach

Cool! I just look for it! Thank you very much!

Posted by Mingzhi Lin

Cool, yes. Nice someone is doing this. But it should have been part of Finder. It's only lazyness that Apple hasn't implemented this. On linux we've had it for years as part of Gnome. Just enter an ssh url, type in a password, and it works.

Posted by tengil

Add your comment

No HTML; Only URLs and line breaks are converted.