January 26, 2007

Posted by John

Tagged mac and ssh

Older: I Don't Feel Like It, Why Don't You

Newer: Oops, I did it again

I can mount my ssh where?

On your desktop. What? Yup, It’s true. If you have a mac, you can now mount an ssh connection on your desktop just like an external hard drive or a mapped network drive. But John, you ask, “what does that have to do with rails?” Well, if you get into rails at all, ssh becomes a staple. From capistrano, to general maintenance of your apps, to a full rails stack install of ruby, apache, mongrel and such, ssh is always there making you feel like you are smarter and cooler than you actually are.

I rarely used ssh before ruby and rails and now not a day goes by without me ssh’ing into some server and releasing my ninja-ism on an errant fcgi process or something. killall -9 —dispa….anyway, I’ll get back on track.

Step One: Install MacFuse and sshFS


Download the macfuse and sshfs dmg files from google code. Install the macfuse and sshfs applications. Macfuse is an installer and sshfs is your typical drag to applications folder install. After you get sshfs installed, start it up.

Step Two: Enter Server and Username

sshfs connect prompt

Step Three: Enter Password

sshfs password prompt

If the auth passes, you’ll end up with a mounted drive like the one pictured below. Pretty sweet, eh?

sshfs password prompt

Step Four: SSH Drag and Drop

Below is an example of me backing up a peepcode screencast to a dreamhost account using sshfs and macfuse.

sshfs finder

Related Links


  1. Nice. Does it save the auth info, and does it also work if you are using key based auth?

  2. Sadly no — I would love to see it use Keychain though — since I can see myself using this little trick a lot.

    Additionally, it seems there’s a timeout bug, at least on TextDrive, where the server will end your session and when SSHFS asks you for your password, it balks and keeps asking you.

    Still — very promising technology!

  3. Prettier front-end to all this (including key based auth): <http://jan.prima.de/%7Ejan/plok/archives/49-Secure-Remote-Disks.html>

  4. oh, textile.


  5. I’ve not noticed the timeout problems mentioned above. However, make sure you log into the server via the command line before using sshfs … it can’t handle the authentication certificat prompt. This also applies if you change the /etc/hosts file to give a more logical name to the desktop-icon.

    Really neat.

  6. In case anyone doesn’t know how to do the same on Linux/KDE, this can be done through a KIOslave called “fish”. Example:
    - start up Konqueror
    - type “fish://yourremotehost” in the location bar.
    - login

  7. objectified objectified

    Jan 27, 2007

    Uh oh, no newline to HTML break conversion, that looks a bit nasty.

  8. objectified: actually, you can do it at a much lower level than KDE with the original FUSE project, which has been around for years on Linux. This MacFUSE is just a belated port of that.

Sorry, comments are closed for this article to ease the burden of pruning spam.


Authored by John Nunemaker (Noo-neh-maker), a programmer who has fallen deeply in love with Ruby. Learn More.


Release your software more often with fewer problems.
Flip your features.