- - Based on FUSE (the best userspace filesystem framework for linux ;-)
- - Multithreading: more than one request can be on it’s way to the server
- - Allowing large reads (max 64k)
- - Caching directory contents
Install SSHFS On LinuxOn Debian/Ubuntu:
SSHFS is available in the default repositories of Debian/Ubuntu and it’s derivatives. So we can install it with root privileges using command:
# apt-get install sshfsOn RHEL/CentOS:
SSHFS is not available in the default repositories. So let us add EPEL repository to install SSHFS. To add EPEL repository on RHEL/CentOS 6.x systems, go to the EPEL website, download and install as shown below.
# rpm -Uvh http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpmNow update package lists and install sshfs as shown below.
# yum update # yum install sshfsUsage
The usage is very simple.
$ sshfs hostname-of-remote-system: mountpointOr
$ sshfs ip-address-of-remote-system: mountpointPlease note that you don’t need to be a root user to mount remote filesystems using SSHFS. Just log in as a regular user and mount the remote filesystem. For example, I am going to mount my Debian server directory to my local Ubuntu desktop.
Create a mount point on local system.
$ mkdir /home/sk/sshfs/Mount the remote system directory on /home/sk/sshfs/ directory using command:
$ sshfs email@example.com:/ /home/sk/sshfs/In the above i mounted the root(/) directory of my remote Debian server to my Ubuntu Desktop.
192.168.1.200 – Debian server IP address.
/ – My Debian server root directory which is going to be mounted on local system.
/home/sk/sshfs – My local Ubuntu system mount point.
Now you can check whether the remote system directory is mounted either using Terminal:
$ df -hSample output:
Filesystem Size Used Avail Use% Mounted on /dev/sda1 292G 238G 40G 86% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 989M 12K 989M 1% /dev tmpfs 200M 872K 199M 1% /run none 5.0M 0 5.0M 0% /run/lock none 998M 6.7M 991M 1% /run/shm none 100M 20K 100M 1% /run/user firstname.lastname@example.org:/ 19G 16G 2.0G 89% /home/sk/sshfsTo unmount the remote file system, simply enter the following command in your local system Terminal.
$ fusermount -u /home/sk/sshfs