PAM_SSH_ADD(8)
β¨ PAM_SSH_ADD(8) β aka pam_ssh_add β¨
okay bestie, gather round, we're talking about a little PAM module from the cockpit universe (section 8 of the manual, sysadmin territory, very demure, very mindful). π
πΈ NAME πΈ
pam_ssh_add β a PAM module that auto loads ssh keys into an agent. literally does your ssh-agent admin for you so you don't have to. ποΈβ¨
π¦ SYNOPSIS π¦
the vibe is: it's a PAM module, you drop it in your pam config, it does the thing. there's no command line to type, no flags to pass at the shell β it's PAM's problem now. π«Ά
π DESCRIPTION π
so like. pam_ssh_add hands you authentication and session modules, and the whole point is that users get to start their session with a running ssh-agent that has as many ssh keys loaded as possible. that's it, that's the dream. π
If you use it, the authentication module basically just... stores the authentication token for later, so the session module can use it. that's it. that's all it does. it's a keeper of secrets, a little token squirrel. πΏοΈ
π¨ important!! Because this module performs no actual authentication, it returns PAM_CRED_INSUFFICIENT on success. yes you read that right, on success. it is NOT an auth module in the "I will protect you" sense, so it should always be accompanied by an actual authentication module in your pam configuration. do not let it carry the team alone bestie, it will not. π
By default, the session module will start a new ssh-agent and run ssh-add, loading any keys that exist in the default path for the newly logged in user. lowkey iconic behaviour. π
And if any of those keys prompt for a password β and an authentication token was successfully stored earlier β then that token will be provided as the password. chef's kiss, no typing, ate. π
π OPTIONS π
debugβ this option turns on debug logging tosyslog. use it when you're in your detective era. π΅οΈβοΈβ¨
π EXAMPLES π
here's the whole vibe in pam config form, copy it exactly bestie:
auth required pam_unix.so
auth optional pam_ssh_add.so
session optional pam_ssh_add.so
see how pam_unix.so is required and doing the actual authentication? yeah. that's the friendship dynamic. pam_ssh_add is the optional bestie holding the keys. π€
π BUGS π
found something cursed? Please send bug reports to either the distribution bug tracker or the upstream bug tracker at https://github.com/cockpit-project/cockpit/issues/new. they want to hear from you fr fr. π
π AUTHOR π
Cockpit has been written by many contributors β https://github.com/cockpit-project/cockpit. a whole group chat of legends. π
π«Ά SEE ALSO π«Ά
(ngl bestie, the original page didn't list any SEE ALSO refs, so go touch some grass or read another manpage, iykyk) πΈ
and that's a wrap! this page came from cockpit, dated 2026-10-22, and it's giving PAM_SSH_ADD(8) main character energy from start to finish. slay, go load those keys. πβ¨π
π¦ where this page comes from
- arch rolling: cockpit 370-1 Β· LGPL-2.1-or-later
- centos-stream 10: cockpit-ws 370-1.el10 Β· LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND CC-BY-SA-3.0 AND BSD-3-Clause
- centos-stream 9: cockpit-ws 370-1.el9 Β· LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND CC-BY-SA-3.0 AND BSD-3-Clause
- fedora 43: cockpit-ws 370-1.fc43 Β· LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND CC-BY-SA-3.0 AND BSD-3-Clause
- fedora 44: cockpit-ws 370-1.fc44 Β· LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND CC-BY-SA-3.0 AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms