Hermit Notebook

Mount a remote file system using SSHFS

Reminder: you can left-scroll and right-scroll the long code blocks

SSHFS allows you to mount a folder on a remote server as file system on your local computer. Its main advantage compared to others possible methods like SFTP is that SSHFS works a normal Linux’s file system, meaning you have file cursors for example.

If you already have an SSH access to the server, you have nothing to do server side.

Follow the simple steps above in order to mount a remote file system using sshfs.

(TODO: generate the ssh key pair to provide ssh access to the server)

  1. Install sshfs if not done already
1
sudo apt-get update && sudo apt-get install sshfs

On Fedora:

1
sudo dnf update && sudo dnf install sshfs
  1. Create the mount point
1
mkdir -p ~/path/to/mount-dir
  1. Mount the drive
1
sshfs user@domain.com:/path/to/shared/folder ~/path/to/mount-dir
  1. To unmount:
1
fusermount -u ~/path/to/mount-dir

See you soon !
Keep learning !