Have you ever thought of using the secure shell to mount a remote file system to a local do? If so, SSHfs maybe what you need. It does this by using SSH and Fuse (LCTT Annotation: Filesystem in Userspace, user mode file system, Linux is used to mount some cyberspace, such as SSH, to the local file system module) allows you to mount remote computer (or server ) locally.
Note: This article assumes that you know how to work and configure SSH SSH on your system.
Before using SSHfs mount, require some setup - Install SSHfs and fuse packages on your system. You also need to create a fuse group, add users to groups, and create a directory on the remote file system will reside.
To install the two packages on Ubuntu Linux, just type the following command in a terminal window:
sudoapt-get install sshfs fuse
ubuntu install sshfs-fuse
If you are not using Ubuntu, then search package name in your distribution package manager. The best search and fuse or SSHfs relevant keywords, because depending on the system you are running, the package name may be slightly different.
After installing the package on your system, created in respect of the fuse group. When you install the fuse, it should create a group on your system. If not, enter the following command in a terminal window to create a group in your Linux system:
After you add a group, add your user to the group.
sudo gpasswd -a "$ USER" fuse
sshfs add users to groups fuse
Do not worry about the above command $ USER. shell will automatically use your own user name replacement. After processing the group and related work, it is time to create a directory to mount the remote file.
mkdir ~ / remote_folder
After your system creates a local directory, you can mount the remote file system SSHfs.
Mounted remote file systems
To mount the remote file system on your machine, you need to enter a long command in a terminal window.
sshfs -o idmap = user firstname.lastname@example.org: / remote / file / system / ~ / remote
sshfs mount the file system to a local directory 1
Note: You can mount the file system via SSH SSHfs key file. Only the top hits with sshfs -o IdentityFile = ~ / .ssh / keyfile, replace sshfs -o idmap = user part.
After you enter this command, you will be prompted to enter the remote user's password. If the login is successful, your remote file system will be mounted to the ~ / remote_folder directory you created earlier.
sshfs mount the file system to a local directory 2
Use over your remote file system, you want to uninstall it? Easy? Only need to enter the following command in a terminal:
sudoumount ~ / remote_folder
This simple command will disconnect the remote connection simultaneously emptied remote_folder directory.
to sum up
On Linux there are many tools can be used to access remote files and mount it locally. But as I said before, if any, only a few tools to take full advantage of the power of SSH. I hope that with the help of this guide, it is also able to recognize the SSHfs what a powerful tool.
SSHfs how you feel like it? In the comment box below to tell us about it!