Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I have Ubuntu 12.04 server edition with home directory encryption enabled. Logging in locally automatically decrypts and mounts my home directory and loads my zshrc. But logging in via ssh just drops me in the bare home directory without decrypting and mounting my home dir.

This is what I see

3014658 dr-x------ 2 david david 4096 Jan 10 14:20 .
3014657 drwxr-xr-x 5 root  root  4096 Jan 10 10:22 ..
3014666 lrwxrwxrwx 1 david david   56 Jan  7 18:42 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
3014662 lrwxrwxrwx 1 david david   31 Jan  7 18:42 .ecryptfs -> /home/.ecryptfs/david/.ecryptfs
3014663 lrwxrwxrwx 1 david david   30 Jan  7 18:42 .Private -> /home/.ecryptfs/david/.Private
3015474 -rwxrwxrwx 1 david david   35 Jan 10 14:20 .profile
3014665 lrwxrwxrwx 1 david david   52 Jan  7 18:42 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
3017327 -rw------- 1 root  root   623 Jan 10 10:40 .viminfo

I created a ~/.profile with the permissions and ownership above. It's contents say to mount my encrypted home and cd into it to refresh my shell.


It doesn't seem to be executing on SSH login. When I run ecryptfs-mount-private manually, I'm prompted for a password. Perhaps this is what's preventing the automatic mounting?

share|improve this question
up vote 0 down vote accepted

Already answered:

In short, SSH don't use ~/.profile, but it's own script ~/.ssh/rc.

share|improve this answer

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.