1PAM_SSH(8) BSD System Manager's Manual PAM_SSH(8)
2
4 pam_ssh — authentication and session management with SSH private keys
5
7 [service-name] module-type control-flag pam_ssh [options]
8
10 The SSH authentication service module for PAM, pam_ssh provides function‐
11 ality for two PAM categories: authentication and session management. In
12 terms of the module-type parameter, they are the “auth” and “session”
13 features. It also provides null functions for the remaining categories.
14
15 SSH Authentication Module
16 The SSH authentication component provides a function to verify the iden‐
17 tity of a user (pam_sm_authenticate()), by prompting the user for a
18 passphrase and verifying that it can decrypt the target user's SSH key
19 using that passphrase.
20
21 The following options may be passed to the authentication module:
22
23 debug [22msyslog(3) debugging information at LOG_DEBUG level.
24
25 use_first_pass If the authentication module is not the first in the
26 stack, and a previous module obtained the user's pass‐
27 word, that password is used to authenticate the user. If
28 this fails, the authentication module returns failure
29 without prompting the user for a password. This option
30 has no effect if the authentication module is the first
31 in the stack, or if no previous modules obtained the
32 user's password.
33
34 try_first_pass This option is similar to the use_first_pass option,
35 except that if the previously obtained password fails,
36 the user is prompted for another password.
37
38 keyfiles Specify the comma-separated list of files in $HOME/.ssh
39 to check for SSH keys. The default is
40 “id_dsa,id_rsa,identity”.
41
42 nullok Allow empty passphrases.
43
44 SSH Session Management Module
45 The SSH session management component provides functions to initiate
46 (pam_sm_open_session()) and terminate (pam_sm_close_session()) sessions.
47 The pam_sm_open_session() function starts an SSH agent, passing it any
48 private keys it decrypted during the authentication phase, and sets the
49 environment variables the agent specifies. The pam_sm_close_session()
50 function kills the previously started SSH agent by sending it a SIGTERM.
51
52 The following options may be passed to the session management module:
53
54 debug [22msyslog(3) debugging information at LOG_DEBUG level.
55
57 $HOME/.ssh/identity SSH1/OpenSSH RSA key
58 $HOME/.ssh/id_dsa OpenSSH DSA key
59 $HOME/.ssh2/id_rsa_* SSH2 RSA keys
60 $HOME/.ssh2/id_dsa_* SSH2 DSA keys
61 /var/run/pam_ssh/<user>*
62 ssh-agent environment information. The files are
63 owned by the superuser but readable by the users.
64 The location is Fedora specific, in the original
65 package these files are in $HOME/.ssh/agent-*
66
68 ssh-agent(1), syslog(3), pam.conf(5), pam(8)
69
71 Andrew J. Korty <ajk@iu.edu> wrote pam_ssh. Dag-Erling Smorgrav wrote
72 the original OpenPAM support code. Mark R V Murray wrote the original
73 version of this manual page.
74
75BSD November 26, 2001 BSD