IoT Application (SSHFS remote mount)

SSHFS will contribute to setting up a comfortable work environment that can boost your workflow. Creating a remote mount point prevents the hassle of transferring files back and forth, on the remote device.

Moreover you gain some flexibility regarding the integration of the code , versioning , collaboration and so on. Knowing that you have options beside developing over ssh or depending on manually ftp the files, is empowering.

Installing SSHFS:

You need to install SSHFS on the local computer , mine being Ubuntu operated:

The current implementation of SSHFS uses FUSE (Filesystem in Userspace). Your user needs to be in FUSE group as for the remote mount to work:

More details in this thread.

Mounting the remote file system:

Create a local mount directory:

or use an existing directory on your local computer, but make sure you have permissions over it.

Since our SSH login is done via key authorization the command to mount will be:

The idmap=user grants your local user ownership over the files . The nonempty should be used if your local mount point directory is not empty. Since the ssh port is not the standard 22 , you need to reference your ssh port. And lastly are the paths to rsa keys , remote directory that you want to mount and the local one in witch to mount.

If you run into trouble use the sshfs_debug flag for more hints on the problem.

Unmount the remote file system:

You can unmount any time with:

There are also other ways to unmount, I use that. The path is the one you choose for your local mount point.

Some extra reading:

For other operating systems, some tutorial could be found here.

Some comunity wiki for sshfs and ubuntu , here.


That`s about it. There are lots of other options in using SSHFS , like auto mount (I do not use it), it is a powerful tool that gives so many advantages.

In the end, creating yourself a remote mount point , might save some time and frustration overall.


Do you feel like you have missed something, try getting your bearings in the intro post for this project, since it also contains a so called glossary where you can access what part is especially relevant to you.

Recommended Posts
  • Alex

    Such a neat article, just love it

Leave a Comment

Start typing and press Enter to search