Forget Samba. Use sshfs!


sshfs is something i only just stumbled across after 5 years of using linux and i could just kick myself for all the effort this would have saved me.

Because i prefer the couch to a desk I wanted to rename and retag my music collection remotely using audio tag tool. (packagename tagtool) tagtool is a godsend for anyone with a large collection as you can set pretty much any tag using the file name and folder location.

The problem with doing this remotely is samba. It doesn’t support as many different characters as my ext3 partitions do. So when samba doesn’t like a folder name it will change to something weird.


Local ./Therapy?
Samba ./THIUB9~3

So if you access your music through samba you won’t be able to tag or even view your music correctly unless you name files with acceptable samba characters or tag manually, which is way to time consuming.

sshfs to the rescue!

sshfs Info:

Filesystem client based on SSH File Transfer Protocol
sshfs 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.
sshfs is FUSE (Filesystem in USErspace).

So to sum up in one sentence. If you can log on through ssh you can mount file systems through ssh.

Machines used in this example:

File Server (host=debian, IP=, Laptop (host=laptop IP= both running Debian Testing amd64. As you can see i’m pretty unadventurous with names.

Install sshfs

debian~# sudo aptitude install openssh-server

Install the client and connect to the file system:

laptop~# sudo aptitude install openssh-client sshfs
laptop~# sudo mkdir /mnt/remote
laptop~# sshfs user@ /mnt/remote

Open up a nautilus window and bam! ‘local’ access to your files.

One Reply to “Forget Samba. Use sshfs!”

  1. I am no longer sure the place you are getting your information,
    but great topic. I must spend some time finding out
    much more or understanding more. Thanks for magnificent information I was in search of this
    information for my mission.

Comments are closed.