Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

up vote 1 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.

Steps:

  • 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

 
discard

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.