Mounting a remote disk using sshfs in Ubuntu 7.04

Jump to: navigation, search

You are in the ASCEND wiki. If you are interested in what ASCEND is, go to our Main Page.


I have two computers running Ubuntu 7.04 and one windows box running Windows XP. In Installing samba and activating rdesktop on Ubuntu 7.04, I described how I set up an Ubuntu box and the Windows box so they could share each others disks - i.e., each could read and write to the disks for the other as if the disks were locally mounted. It occurred to me that, if one can share disks between Ubuntu and XP, one should also be able to "mount" a remote Ubuntu disk. Indeed one can and one can do it securely - i.e., the remote disk can be somewhere out there on the net. The protocols are based on ssh and the magic command is sshfs.

Assumption: ssh is installed on the remote computer.

Useful web site

The website Mount a remote ssh filesystem tells one how to do such a set up.

How to do it

I will repeat the instructions here and comment about my experiences with setting up this disk sharing.

Let us suppose your userID is itsME locally and itsMEonRemote on the remote computer. (My userID is actually the same on both computers so I have not tested this with two different userIDs.) Also assume the remote computer is The following instructions should do the trick.

1. Install sshfs and related packages

sudo apt-get install sshfs

(or use the Synaptic Package Manager). Installed will be sshfs, fuse-utils and libfuse2.

2. Set up a local mount point

sudo mkdir /media/myRemoteDisk

and give yourself ownership

sudo chown itsME:itsME /media/myRemoteDisk

3. Add yourself to the group fuse

sudo add-user itsME fuse

4. Make sure that the group fuse has access to the command /usr/bin/fusermount

ls -al /usr/bin/fusermount

If not change ownership so that it does:

sudo chown root:fuse /usr/bin/fusermount

5. Make sure that the group fuse has access to the file /dev/fuse

ls -al /dev/fuse

If not change ownership so it does

sudo chown root:fuse /dev/fuse

6. The above web site says you should logout (not shutdown) and log back in. I did this but am not sure it is required.

7. Mount your remote disk

sshfs -o transform_symlinks /media/myRemoteDisk

The disk should appear on your desktop. You should be able to access it as if it is a local disk. Do not forget the option to transform symbolic links, or you will get some unexpected behavior when trying to following them on the remote machine (if the path exists on your local machine, you will end up following it to a local target instead. If the path does not exist locally, you will get a broken link message.)

Some comments

The above web site mentions what to do if you encounter the error message "fusermount: fuse device not found, try ‘modprobe fuse’ first." I did not have this problem so I am assuming my system already includes this module.