# SSHFS Mounting a remote filesystem over ssh

SSHFS allows you to mount a remote filesystem using SFTP. Most SSH servers support and enable this SFTP access by default, so SSHFS is very simple to use - there’s nothing to do on the server-side.

## Install sshfs

Arch Linux

sudo pacman -S sshfs


sudo apt install sshfs

Void Linux

sudo xbps-install -S fuse-sshfs

## Syntax

sshfs [user@]host:[dir] mountpoint [options]

## Examples

To use sshfs you need a mounting point in your system, in Linux system usually the mount point is in /mnt directory.

Create a mounting point (example)

mkdir ~/Documents/myVideos
sudo mkdir /mnt/myVideos

You can create a mounting point in another directories like you home directory or anywere you like.

### To mount a directory

sshfs user@ ~/mnt/myVideos -o reconnect

Or, we can use domain name/host

sshfs user@domain.com:/home/user/Videos ~/mnt/myVideos -o reconnect

### To unmount a directory

fusermount3 -u ~/mnt/myVideos

For more information check the manpage

man sshfs



© DarknessCode - LinuxSucks