Mounting file system over SSH then decrypt with EncFS on Arch Linux

Mounting file system over SSH then decrypt with EncFS on Arch Linux

I have a remote folder on my NAS (that is actually a dropbox folder my NAS syncs) encrypted with EncFS, which I would like to open on my Arch Linux box.
I’m a long time fan of TrueCrypt, but for this particular setup, where the size of the encrypted data can vary (it is not a disk or a container with a fixed size), I found EncFS to suit my needs better. Now from my understanding (and general tinkering with the two), I believe TrueCrypt is more secure, but it just isn’t workable in a setting as described above.

So what do you need to get this working:

pacman -S sshfs

This will give you the option to mount your remote folder on your local file system over ssh. To do this simply enter the following command as a normal user.

sshfs REMOTEUSER@REMOTEBOX:/path/to/remote/folder /path/to/local/folder -options

To unmount it use:

fusermount -u ~/secure

That’s it. If the values are correct and the local folder exists, you should see a list of files. In my case a lot of encrypted files and folders.

Ok, on with the next part, decrypting them. Install encfs.

pacman -S encfs

Mount the above folder:

encfs ~/secure ~/unsecure
# Remember to use absolute paths here.

To unmount it use:

fusermount -u ~/unsecure

And that is all. The files should be visible and decrypted now.

Leave a Reply

