You are here

Remote file access with sshfs

If you need to get access to files on a remote machine, but the filespace on that machine isn't normally visible from your local machine, you can often access it over the network using the SSH userspace filesystem sshfs tool. On Debian/Ubuntu machines you will need to install the sshfs package, on Redhat/Fedora machines the package is named fuse-sshfs.

Here's an example. To make machine xyzzy's directory /tmp available locally you could do something like the following:

mkdir ~/localxyzzy
sshfs xyzzy.inf.ed.ac.uk:/tmp ~/localxyzzy

To clean up afterwards you would type

fusermount -u ~/localxyzzy

For full details type man sshfs.

There are a couple of points to note.

  1. If your machine is outside of the Informatics wired network, or is on wireless, you will first need to connect securely into Informatics, using for instance a VPN or an ssh tunnel. (For an example of how to set up an ssh tunnel see the Using VNC page.)
  2. Also, be aware of the limitations of sshfs: it's useful for giving temporary access to one remote filesystem to one user on one machine. If you want more than that you might want to look for a different (less hacky) solution.
Last reviewed: 
14/03/2023

System Status

Home dirs (AFS)
Network
Mail
Other services
University services
Scheduled downtime

Choose a topic