If my computer has the pam package installed and has the directory /etc/pam.d/sshd, does it mean for sure when I ssh to my computer, I am authenticated through pam modules? The /etc/pam.d/sshd looks like this:

  auth       include      system-auth
  account    required     pam_nologin.so
  account    include      system-auth
  password   include      system-auth
  session    optional     pam_keyinit.so force revoke
  session    include      system-auth
  session    required     pam_loginuid.so

1 Answer 1


Technically the default is that sshd does not use PAM. From the sshd_config manpage:

UsePAM Enables the Pluggable Authentication Module interface. [...] The default is ``no''

But this option is almost universally enabled by SSH installations by OS distributions and default config files and such. You can check if it's enabled in /etc/ssh/sshd_config if you want to be sure though.

However, even when PAM is in use by sshd, you can still be authenticated with an SSH key, which bypasses the PAM authentication part (PAM accounting and session management are still done).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .