I've setup an encrypted homedir according to this EncryptedHomeDirectoryHowto.
To gain ssh access I've added
auth required pam_encfs.so to
$ cat /etc/pam.d/sshd | egrep -v ^# auth required pam_env.so #  auth required pam_env.so envfile=/etc/default/locale auth required pam_encfs.so @include common-auth account required pam_nologin.so @include common-account @include common-session session optional pam_motd.so #  session optional pam_mail.so standard noenv #  session required pam_limits.so
It does work for a short time after login but after 5-10min the homedir will be unmounted. If I'm logged in locally everything is working fine. Even ssh from an other machine.
It seems like unmount is done everytime cron is starting:
Feb 22 19:01:01 xxxxx sshd: Accepted password for USER from xxx.xxx.xxx.xxx port 39769 ssh2 Feb 22 19:01:01 xxxxx sshd: pam_unix(sshd:session): session opened for user USER by (uid=0) Feb 22 19:05:01 xxxxx CRON: pam_unix(cron:session): session opened for user root by (uid=0) Feb 22 19:05:01 xxxxx CRON: pam_unix(cron:session): session closed for user root