I recently discovered SSHFS, or SSH filesytem, and I haven’t used Samba or NFS for my Linux sharing needs since. It has all the features of Samba and NFS, without all the headaches. To install on Ubuntu, just:
apt-get install sshfs
usermod -a -G fuse username
and to mount a filesystem:
sshfs username@remote_machine:remote_dir local_dir
You may be wondering why I have become such an advocate for SSHFS overnight. Here are the biggest benefits I see:
- Encryption
- Reliability
- User mounting without any root privileges
- No Gnome keyring to manage Samba password (I hate Gnome keyring)
- NO SERVER SETUP
Unfortunately, there are a few downsides to using this remote filesystem utility. Supposedly SSHFS is not as fast as Samba or NFS although I can’t really tell any differences. Also, to mount a windows directory, the windows machine must have OpenSSH for Windows installed, which is just a subset of Cygwin.
If you are planning on using Subversion over SSHFS, make sure you connect using the “-o workaround=rename” option because of a POSIX vs. SFTP problem discussed on the FUSE wiki. I don’t recommend using svn over SSHFS because of how I/O intense it is though. Since svn has to read so many files when performing operations, it has proven quite slow in my experience. I read a post saying “-o direct_io” and “-C” options can improve performance, but I didn’t really see any differences. That could be because the working versions I have are around 75 MB each.
I encourage anyone to try it out, you won’t be disappointed.