Several articles ago I explained how to mount a remote machine via FTP, so that the PC on which we operate is seen as a directory locale. The program used to establish the connection between the two machines is unpronounceable: “curlftpfs“. Today we will do the same thing, but the protocol used will be the’SSH. We will find several similarities to the article previously developed, one in all the impronunciabilità the software used: “sshfs“.
How much of the useful software, “sshfs” is directly installed via repository. It will be sufficient to look inside the graphical tool in use to the distribution.
In alternative, its Debian (Debian, Ubuntu, e derivate) type of terminal:
sudo apt-get install sshfs
To Red Hat (Fedora, Centos, e derivate) type of terminal:
sudo yum -y install sshfs
Some libraries will be installed automatically: “fuse-utils” and “libfuse2“, weigh little and do a great service.
At this point we decide in which directory will be mounted sharing:
sudo mkdir / media / pc-remote /
Let's now in use user administrative privileges to mount the shares in the newly created directory:
sudo chown user / media / pc-remote
Obviously the word “user” It will be replaced by the user actually used.
To be able to mount shares via SSH you need a last little trick. The user mounts the share must belong the group “fuse” (which is usually already created). You can apply the changes using the graphical tool available (on Gnome 2 is under “System” – “Management” – “Users and Groups“), or type the following instructions from the terminal:
sudo adduser unlit fuse
Remain valid rule change the oral “user” with the user actually used.
Now that everything is in order we should be able to mount our sharing SSH:
sshfs 192.168.1.101:/home / user / Documenti / media / pc-remote
With this simple statement, the system will recognize an actual mount point in / media / pc-remote, and behave as if it were operating in the local. To make a comparison will be how to transfer files across the LAN, o Internet, but the user will have the impression of moving files from a USB memory.