On Ubuntu Server 12.04 LTS, ecryptfs is set up where my /home/user/.private directory becomes decrypted when I login. I can then access my files in /home/user/private.

But if I don't login to the server, but I access the server in Nautilus from Ubuntu Desktop using SSH, the Private folder is still encrypted so I can't view the files.

Is there a way so when SSHFS is used via Nautilus and the SSH share is mounted, the server will decrypt the .private directory?

Or, can it always be decrypted as long as the server is turned on? I'm only interested in the encryption if the server is off (i.e, HDD stolen).

1 Answer 1


It's essential that you login at least once, and provide the login passphrase to the system at least once per boot, to mount your encrypted data. By default, pam_ecryptfs will unmount your data on logout.

The best way to achieve the functionality you want, while still having some measurable amount of security, is to simply remove the automatic unmount flag, which is enabled by default.


  • Login to the server system, and: rm ~/.ecryptfs/auto-umount
  • Once per system boot, you'll need to logon to the server and provide your login passphrase. After that, you can logout and use Gnautilus + sshfs and read/write your encrypted data.
  • Thank you so much! Once per boot's not so bad, especially as a server that stays on mostly. This is great!
    – nLinked
    May 16, 2012 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.