Thursday, 1 March 2012

Mount a remote filesystem locally with sshfs

I only occasionally need or choose to work from home. When I do, I need to get at my files on the department filesystem. There are many ways to skin this particular cat but a recent blog post by Matt Might mentions one of the easiest ways yet: a small application called sshfs.

The name says it all. This command line program mounts a remote filesystem at a local point over SSH. Usage is simple too. Just enter

sshfs user@host:/remote-folder/ local-mount-point/

and you can start using the files. I now mount my departmental home folder on my laptop and start edit my remote thesis as if it were a local file. To unmount, enter

fusermount -u local-mount-point

I use Linux both in the office and on my personal machines but the Matt Might's blog post mentions how to do it on other systems. It should be easy on Mac OS X because it's so Linux-like under the hood already. You also may have to install sshfs in some Linux distributions. I had to install it on Ubuntu 11.04 but it's as easy as

sudo apt-get install sshfs

which Ubuntu tells you anyway if you don't have sshfs installed.

Have you used sshfs for remote working? Problems to watch out for? Better choices? Let me know below.

1 comment:

  1. This comment has been removed by a blog administrator.