Easy Filesharing in Linux (and Fast and Secure) using SSHFS

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

If you are frustrated with Samba and would like something a bit more solid and speedier whilst being very easy to set up, check out SSHFS.

To install it you simply need to do


sudo apt-get install sshfs

Once that’s done you can mount a remote filesystem in a very similar way to accessing a remote machine via SSH

eg



#Mount
sshfs  -p2020 -o idmap=user $USER@laptop.com:/home/joseph/Projects ~/Mounts/Laptop/Projects

#Unmount
fusermount -u ~/Mounts/Laptop/Projects


You need to have previously created the local folder you are going to mount to (in this case /home/joseph/Mounts/Laptop/Projects)

Note also I am using a non standard SSH port with the -p2020 bit (using port 2020). If you are using standard SSH ports you can remove this, or of course change the port number to whatever you prefer.

https://help.ubuntu.com/community/SSHFS for more info


Tags: ubuntulinuxsshaccesssshfsfilesharingremote