Accessing remote filesystem via ssh like it is on your local machine

1's picture

Software: 

This can be of interest to people who have a lot of data on a server they need to work on with the tools available on their local machine.

It is much more convenient to access those files like they are stored on your computer than to scp them, or even worse, email them. The tool which allows this is sshfs.

You need to install fuse and sshfs (Debian Squeeze):

1) aptitude install sshfs

Afterwards, add your current user account to fuse group with:

2) adduser mynick fuse

Both previous commands to be executed as root.

Then, mount your remote filesystem with:

3) sshfs remote_host_address:remote_dir localdir/

You can now browse directory tree under the remote_dir from localdir/

There are options you can pass to sshfs, and i find particularly useful
follow_symlinks. The entire command is

4) sshfs remote_host_address:remote_dir localdir/ -o follow_symlinks

With this option, symlinks on the remote system are now usable.

To unmount:

5) fusermount -u localdir/