Mount remote directories using SSHFS

@ 2009-05-19 by João Paulo Pizani Flor

Some time ago I posted about how to use SSH without typing passwords, thus making the login into a remote server much simpler. Recently I’ve found that SSH allows you to mount remote directories, in a very easy way. Only the SSH daemon is needed in the server for this mounting to work.

Imagine that at home you have a PC with a 1TB harddrive where all your movies and music are stored. And that you also have a lightweight netbook, but with little storage, and that you have access to broadband Internet. If you want to access your files in the netbook, what is the solution? Use SSHFS and use the files as if they were local.

And now to the few steps on installing, setting up and using SSHFS (all of the following steps are done on the CLIENT side):

In a next post I’ll show how you can automate the mounting and unmounting process using autofs, a great Linux tool. Using autofs you can configure some remote directory you use often, and it will always be at your fingertips, mounted automatically just when you need it and unmounted when you don’t. But even without autofs, sshfs is already VERY useful.