Late to the part as usual. However, this has to be the coolest thing since sliced bread and it beats Samba in so many ways I can barely contain myself. The last couple of weeks have seen me become a bit of a SSH junkie, I’ve been running OpenSSH for well over a year but never really leveraged it to do more than shell into the server to check system mail and do general maintenance but after my successful PuTTY and TightVNC experiment I figure it was worth checking out what else I can do with it.
Michuk posted an article over at jakilinux.org that outlined some of the basics, like remote applications using X forwarding, but it was the chunk on SSHFS that really tickled my fancy. Samba shares are nice but brutally slow for copying files so most of the time I rely on SCP but that can be tedious, in my limited opinion, if you are looking for patterns or moving large amounts of scattered data. Enter SSHFS which allows you to mount remote folders via SSH and have all the security and speed.
My goal was to have my music available to Beep Media Player, which didn’t recognize Samba shares, and to potentially speed up Rhythmbox’s cataloging which is brutally slow over Samba. Needless to say it is stupid simple. Check it out:
Execute the following commands:
you@yourbox:/$ sudo apt-get install sshfs
you@yourbox:/$ sudo nano /etc/modules
Add fuse to the list, save and close.
Add yourself to the fuse group under System–> Administration–> Users and Groups.
Logout and back in.
Create a mountpoint and take ownership of it:
you@yourbox:/$ sudo mkdir /mnt/my-share-name-here
you@yourbox:/$ sudo chown myname /mnt/my-share-name-here
Here’s the magic:
you@yourbox:/$ sshfs you@remote-pc:/your-remote-share /mnt/my-remote-share-name-here
When you are all done don’t forget to clean up after yourself:
you@yourbox:/$ fusermount -u /mnt/your-remote-share
Super easy, super simple, fast, and secure. Here are a couple of more resources that I used as references when doing this: Ubuntu Forums HOWTO, and Ubuntu.wordpress.com.
Comments
james, Sonny
james, james, Kirrus [...]
Chris Rosenzweig, Cyndy, Jenn Elwood [...]
Christian, Quyen
Quyen, Kirrus
james, Tyler