Mounting folders through SSH
avatar

One of the first rules of security is to not have any ports open which you do not need to have open.  That is also pretty common sense.  One problem you run into though is you still need to access data from one machine on another.  Samba is generally used for file sharing but since it follows the windows standard for file sharing it announces your shares to anyone who asks.

If it is just you accessing your files you can actually mount a folder from another system using sshfs.  Sshfs is available in all of the major distro’s repositories so it should be easy to find.

The first step is to just create a folder which you want to use as a mount point.  Once you do that you just use the following command:

sshfs <user>@<machine>:/path/on/remote/system /local/path

After you do that your local folder will now display the contents of your remote folder.

If you want to allow other users to access the folder as well you need to add all_other as shown below.

sshfs -o allow_other,default_permissions

This entry was posted in Arch, CentOS, Fedora, Guides, Linux and tagged , , , , . Bookmark the permalink.

Leave a Reply