Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

share|improve this question
up vote 4 down vote accepted

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.
share|improve this answer
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 '12 at 16:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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