sshfs: A simple Linux file-sharing solution

What’s a quick, simple way to set up a file share between two Linux boxes? I looked into NFS shares, but that involves running extra daemons, and I don’t want to deal with the hassle of extra configuration files and daemons. I looked into SAMBA — OK, I didn’t; the thought grossed me out before I even gave it a chance.
Enter sshfs
According to the project website:
This is a filesystem client based on the SSH File Transfer Protocol. Since most SSH servers already support this protocol it is very easy to set up: i.e. on the server side there’s nothing to do. On the client side mounting the filesystem is as easy as logging into the server with ssh.
Now that sounds exactly like what I’m looking for! And, yes, this is yet another brilliant filesystem application using the FUSE kernel module.
Setting up sshfs
sshfs is a snap to use if you already have a server you ssh into regularly. Especially if you’ve already set up password-less authentication. We’ll suppose your home machine is called “home” and your remote server is called “remote”. And let’s say that there is a directory on “remote” at /media/video that you want to mount locally.
mkdir video
sshfs remote:/media/video video
That’s it! It mounts immediately using your ssh authentication credentials, and you’re all set. When you want to unmount the share, just use:
fusermount -u video
For simple, secure, no-hassle file sharing, give sshfs a try!
Related Posts
Tags: fuse • linux • mount • samba • sshfs
Posted in solutions on January 24th, 2008 |
