Mount an remote directory using SSHFS

Tested on Ubuntu 18.04 and 18.10

First install the module sshfs, if isn’t installed:
sudo apt-get install sshfs
Load module in kernel:
sudo modprobe fuse
Setting the permissions:
sudo groupadd fuse 

sudo adduser $USER fuse

sudo chown root:fuse /dev/fuse

sudo chmod +x /dev/fusermount
If you get an error from last command: No such file or directory
whereis fusermount

#than whit returned directory

sudo  chmod +x /bin/fusermount
Now we need to create a directory for mounting the remote folder. For example onCloudDir.
mkdir ~/onCloudDir
Now we ran the command to mount the remote folder:
sshfs ~/onCloudDir is an address of your remote server, and ofcource you will need some other path and/or user.
Check if is mounted successfully:
cd ~/onCloudDir
ls -l 
For this to work, without typing username and password, you will need to generate SSH and add it to the ssh-agent

Leave a Comment

Your email address will not be published. Required fields are marked *