Getting pam_mount to work with ssh

Is anyone using pam_mount with ssh?

I do a su - user it works fine, but if I do ssh user@localhost it fails

sshd[1342]: Accepted keyboard-interactive/pam for montgomeryb from ::1 port 48110 ssh2
sshd[1342]: pam_mount(pam_mount.c:553): pam_mount 2.8: entering session stage
sshd[1342]: pam_mount(pam_mount.c:172): conv->conv(...): Conversation error
sshd[1342]: pam_mount(pam_mount.c:476): warning: could not obtain password interactively either

From searching the net, it seems that this is related to ssh not playing nicely with pam. However, it works fine with the pam_krb5 module and here are the parts of the sshd_config

PasswordAuthentication yes
ChallengeResponseAuthentication yes

UsePAM yes

Originally, password and challenge were both no. Either way it doesn’t seem to make a difference.

If you can point me in the correct direction it would be much appreciated.


this thread is quite old, but the problem still seems to exist. I can also mount dirs with KDE-login and local tty but NOT with ssh. I am using OpenSuSE 13.1.
Is there somewhere a solution? I did not yet find any :X
Thanks to all helpers

Better start a new thread. Do you realy think many people are reading this? I only came here by incident.