Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to reduce ssh connection time, by debugging sshd have found that libpam is loading all pam modules specified in /etc/pam.d/sshd file at every connection.

How to configure/modifiy libpam such that it loads modules only for first connection and after it uses same modules for every connection? I know libpam was designed for loading pam modules but want to load pam modules once.

Let me know if anyone have any idea.

I'm using OpenSSH_5.8p1, OpenSSL 1.0.0l and Linux-PAM-1.1.3

share|improve this question
2  
Out of curiosity, did your debugging actually show that PAM loading was slow compared to the other parts of starting the session? If so, is PAM doing a lot of work to do authentication or is it really just the loading that is slow? Sorry to ask so many skeptical questions, it is just very surprising to me. I would expect other portions of the connection to dwarf simply loading the PAM modules. For example, if you have "UseDNS" set to yes. –  Steven D Mar 27 at 6:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.