I just used Fuse to mount my home directories on two remote machines - and was pretty painless.

I'm using Ubuntu 6.10 so was fairly easy. I followed the instructions from here - How to mount a remote ssh filesystem using sshfs.

So I did:

 # apt-get install sshfs
 # adduser andy fuse
 # mkdir /mnt/fowler /mnt/rush
 # chown andy.andy /mnt/fowler /mnt/rush

Then (after logging out and in again to refresh my groups list):

 $ sshfs fowler:/home/andy /mnt/fowler
 $ sshfs rush:/home/andy /mnt/rush
 
 $ ls -l /mnt/fowler
 ...stuff...
 $ ls -l /mnt/rush
 ...stuff...

Note: sshfs fowler:~ /mnt/fowler didn't seem to work. I don't know why, I suspect it should.

Since I use KeyChain for my SSH keys, I usually have those loaded by the time I want to look at a remote machine.

Anyway, it's fairly cool and dead easy.

One funny thing though was:

 [metis:~]$ df -h /mnt/fowler
 Filesystem            Size  Used Avail Use% Mounted on sshfs#fowler:/home/andy/
                       7.5T     0  7.5T   0% /mnt/fowler
 [metis:~]$ df -h /mnt/rush
 Filesystem            Size  Used Avail Use% Mounted on sshfs#rush:/home/andy/
                       7.5T     0  7.5T   0% /mnt/rush

A total of 15 Terabytes of storage :-) especially because fowler only has 40Gb of storage and rush is a 4Gb VPS :-)


This post originated on http://chilts.org/.

Email me on andychilton -at- gmail -dot- com.



Published

24 March 2007

Tags