I am using encrypted home directories mounted by pam_mount at the opening of the session. I have also configured ssh to use pam_mount during the authentification process. The problem is that when I close the ssh session, the encrypted volumes aren't unmounted. This doesn't happen for a local connection. In that case, encrypted volume are correctly unmounted after logout.
I think this is another instance of bug #926. There's a patch attached to that bug which apparently resolves it but I've not had a chance to look at it, and I'm not sure if it will apply to current version.
Thanks for your help. I tried the last patch attached to bug #926 and with that, pam volumes get unmounted after logout. So I hope this patch will be integrated in the next releases of openssh. For me, the bug is fixed with this patch
Close resolved bugs after release.