Ssh – Per-user umask over all ssh connections

pamsshumask

Following on from How to setup ssh's umask for all type of connections

Is it possible to do this on a per-user basis? Here's what I have at the minute:

/etc/pam.d/ssh

sesssion optional pam.umask.so umask=0027

Thanks.

Best Answer

  1. The value set by pam_umask can be overridden by the user for interactive logins (man umask)

  2. pam_umask has provisions for per-user settings (man pam_umask)