Archive

Posts Tagged ‘sshfs’

sshfs

February 27th, 2009

I recently decided I was fed up with maintaining the files on my web host’s server via FTP. It is just a very unnatural and inconvenient way to update remote files – especially when making lots of small tweaks. What I really wanted was the normal file system abstraction. It seemed like mounting the remote file system as a folder in my local filesystem over SSH/SFTP would be ideal. Luckily, Miklos Szeredi (the author of FUSE) already did the hard work of implementing a little program called sshfs which does just that.

It was a piece of cake to install on my Linux box, and it looks like Mac’s have an implementation of FUSE available too. Once you have installed the tool you can mount a remote file system just like this:

format: sshfs username@host: folder_to_mount_in
example: sshfs dound@myhost.com: wwwdound

I now use sshfs to mount folders from a variety of remote machines on my local machine — it is much better-suited to many tasks than FTP, and for some tasks it beats SSH too. It is also handy when I want to grep remote files on a server I only have FTP access to. The only downside is that while you are in a terminal whose current working directory is within the remotely mounted directory all commands experience a slowdown – while I expected file-related commands like to run slower, I did not expect commands like clear to experience a noticeable latency. It is not clear to me whether this is an issue with sshfs, FUSE, or mounted file systems on Linux in general, but maybe I will look into it later. Regardless, I highly recommend sshfs — it is a very handy utility and much better than the alternatives.

David Underhill Linux, Software , , , , , ,