Those lines below are my notes to mount an remote folder through ssh, using sshfs  and building an encrypted container with encfs . I’ll not explain in details how to install sshfs and encfs ’cause it dependes whether linux distribution or unix-like bsd flavor you’re running, furthermore, there are tons of documents on web convering these topics.
IMHO, this is a great solution to easily store securely your files in any remote host that you have access through ssh, using well known common unix tools.
1) Mount remote filesystem through ssh:
sshfs user@host:/full/path/dir/ /full/path/mount_point
It’s important to say that directory paths to use with sshfs and encfs should be given in the full form. I mean /home/user/mount_point and not ~/mount_point/. Also, if the user of remote server and local computer has differents uid/gid, you should tell that to sshfs using the flag -o (for more details read the manpages):
sshfs -ouid=1000 -ogid=1000 user@host:/dir/ mount_point
You can check if the remote folder is well mounted doing the df command or listing the files inside this folder. With a df you should seed see something like this:
host:/full/path/dir/ 459G 76G 384G 17% /full/path/mount_point
2) Build an encfs container:
encfs /full/path/mount_point/some_dir /full/path/temp_dir/
The encfs creation routine’s is self explanatory, so just follow the steps and answer accordingly. After this, you should see, with df -h:
encfs 459G 76G 384G 17% /full/path/temp_dir/
3) do the backup with rsync: <- This step is optional, you can copy or move the desired files/folders manually. rsync -avz /some/dir /temp_dir/ 4) When you're done with the encrypted container and remote file system, eventually, you should umount it. Especially if you're going to loose connection within it. 4.1) Umount encrypted container:
fusermount -u /temp_dir/
Umount remote filesystem:
fusermount -u mount_point
The steps to reconnect and remount the remote filesystem/container are the same above, except that when you call the encfs command, it will ask for your container’s password.
And that’s all!