Mounting remote folders into local directories using sshfs
If sshfs
is currently not installed on your current operating system, you need first install it. A very nice guide to install on different operating systems can be found here.
Taking Ubuntu as an example, once sshfs has been installed, one needs to uncomment the line
in the fuse
configure file /etc/fuse.conf
.
To allow our current account be able to run sshfs
commands, we need to add current user into the fuse
group list, this can be done using the following command:
and we need to log out then log in again, to make this change taking effect. You can use
to check if fuse
in your current user’s groups list, check here for more information.
Now we can start to mount our remote folder onto our local folder. Suppose we want to mount data folder from test.server
to our /mnt
directory, we need first to give the write permission of /mnt
to current user:
Then create a local data directory, which will be used to mount remote data onto, as below:
Enjoy!