Cookie Into the (open) source


Mount a remote device in tunneling “sshfs”


This article was written in the 2011, there may have been some developments in the subject matter.
If in doubt please leave a comment in the bottom of the article.

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 a number of similarities with 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 enough to look inside the graphical tool in use at 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 /

We now give the user administrative privileges in use to mount the shares in the newly created directory:

sudo chown user / media / pc-remote

Obviously the word "user" 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 shared 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 / 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.

I transfer a local file remotely as if you were working in local


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.