Mount an remote directory using SSHFS
2019-02-17
2019-02-18
Tested on Ubuntu 18.04 and 18.10
First install the module sshfs, if isn’t installed:sudo apt-get install sshfsLoad module in kernel:
sudo modprobe fuseSetting the permissions:
sudo groupadd fuse sudo adduser $USER fuse sudo chown root:fuse /dev/fuse sudo chmod +x /dev/fusermountIf you get an error from
whereis fusermount #than whit returned directory sudo chmod +x /bin/fusermountNow we need to create a directory for mounting the remote folder. For example onCloudDir.
mkdir ~/onCloudDirNow we ran the command to mount the remote folder:
sshfs root@xxx.xxx.xxx.xxx:/var/www/html/laplap-capi ~/onCloudDirxxx.xxx.xxx.xxx 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 -lFor this to work, without typing username and password, you will