SSHFS Configuration

Created: Sept. 11, 2020 |  Modified: Sept. 11, 2020 |  Categories:  macOS   Linux   Productivity  

SSHFS allows us to mount a remote filesystem and work with it locally. This means that instead of using the terminal to work with files on the server, we can simply mount the server’s filesystem with SSHFS and then use our local file explorer to navigate and manipulate files as though they existed on our laptop or desktop.

  1. Install sshfs:
    1. Linux: sudo apt-get install sshfs
    2. macOS: brew install sshfs
  2. Create an empty directory for mounting the filesystem (this can be anywhere, but let's create it in our home directory):
    1. mkdir ~/<new_directory>
  3. To mount the filesystem:
    1. sshfs <user_name>@<host_name>:/<directory> ~/<new_directory>
  4. To unmount the filesystem:
    1. umount ~/<new_directory>

Alternatives:

Visual Studio Code has a remote development extension. This works great if you’re doing a lot of coding on the remote server, but not so well if you just want to be able to move files around or easily copy them to your local computer.