xref: /freebsd/lib/libpam/modules/pam_ssh/pam_ssh.8 (revision c777c69bdcd2d896c0f971a52006434608e7da9d)
11642eb1aSMark Murray.\" Copyright (c) 2001 Mark R V Murray
21642eb1aSMark Murray.\" All rights reserved.
3d9027819SDag-Erling Smørgrav.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
4b4a47593SDag-Erling Smørgrav.\" All rights reserved.
5b4a47593SDag-Erling Smørgrav.\"
6b4a47593SDag-Erling Smørgrav.\" This software was developed for the FreeBSD Project by ThinkSec AS and
7b4a47593SDag-Erling Smørgrav.\" NAI Labs, the Security Research Division of Network Associates, Inc.
8b4a47593SDag-Erling Smørgrav.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
9b4a47593SDag-Erling Smørgrav.\" DARPA CHATS research program.
101642eb1aSMark Murray.\"
111642eb1aSMark Murray.\" Redistribution and use in source and binary forms, with or without
121642eb1aSMark Murray.\" modification, are permitted provided that the following conditions
131642eb1aSMark Murray.\" are met:
141642eb1aSMark Murray.\" 1. Redistributions of source code must retain the above copyright
151642eb1aSMark Murray.\"    notice, this list of conditions and the following disclaimer.
161642eb1aSMark Murray.\" 2. Redistributions in binary form must reproduce the above copyright
171642eb1aSMark Murray.\"    notice, this list of conditions and the following disclaimer in the
181642eb1aSMark Murray.\"    documentation and/or other materials provided with the distribution.
19b4a47593SDag-Erling Smørgrav.\" 3. The name of the author may not be used to endorse or promote
20b4a47593SDag-Erling Smørgrav.\"    products derived from this software without specific prior written
21b4a47593SDag-Erling Smørgrav.\"    permission.
221642eb1aSMark Murray.\"
231642eb1aSMark Murray.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
241642eb1aSMark Murray.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
251642eb1aSMark Murray.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261642eb1aSMark Murray.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
271642eb1aSMark Murray.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
281642eb1aSMark Murray.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
291642eb1aSMark Murray.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301642eb1aSMark Murray.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311642eb1aSMark Murray.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321642eb1aSMark Murray.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331642eb1aSMark Murray.\" SUCH DAMAGE.
341642eb1aSMark Murray.\"
351642eb1aSMark Murray.\" $FreeBSD$
361642eb1aSMark Murray.\"
37b4a47593SDag-Erling Smørgrav.Dd November 26, 2001
38b4a47593SDag-Erling Smørgrav.Dt PAM_SSH 8
391642eb1aSMark Murray.Os
401642eb1aSMark Murray.Sh NAME
41b4a47593SDag-Erling Smørgrav.Nm pam_ssh
4232f0c048SDag-Erling Smørgrav.Nd authentication and session management with SSH private keys
431642eb1aSMark Murray.Sh SYNOPSIS
441642eb1aSMark Murray.Op Ar service-name
451642eb1aSMark Murray.Ar module-type
461642eb1aSMark Murray.Ar control-flag
47b4a47593SDag-Erling Smørgrav.Pa pam_ssh
481642eb1aSMark Murray.Op Ar options
491642eb1aSMark Murray.Sh DESCRIPTION
501642eb1aSMark MurrayThe
51b4a47593SDag-Erling SmørgravSSH
521642eb1aSMark Murrayauthentication service module for PAM,
531642eb1aSMark Murray.Nm
541642eb1aSMark Murrayprovides functionality for two PAM categories:
551642eb1aSMark Murrayauthentication
56b4a47593SDag-Erling Smørgravand session management.
571642eb1aSMark MurrayIn terms of the
581642eb1aSMark Murray.Ar module-type
591642eb1aSMark Murrayparameter, they are the
6008ecaa10SRuslan Ermilov.Dq Li auth
611642eb1aSMark Murrayand
62b4a47593SDag-Erling Smørgrav.Dq Li session
631642eb1aSMark Murrayfeatures.
64b4a47593SDag-Erling Smørgrav.Ss SSH Authentication Module
651642eb1aSMark MurrayThe
66b4a47593SDag-Erling SmørgravSSH
671642eb1aSMark Murrayauthentication component
68b4a47593SDag-Erling Smørgravprovides a function to verify the identity of a user
691642eb1aSMark Murray.Pq Fn pam_sm_authenticate ,
70b4a47593SDag-Erling Smørgravby prompting the user for a passphrase and verifying that it can
71b4a47593SDag-Erling Smørgravdecrypt the target user's SSH key using that passphrase.
721642eb1aSMark Murray.Pp
731642eb1aSMark MurrayThe following options may be passed to the authentication module:
74e8b02a42SRuslan Ermilov.Bl -tag -width ".Cm use_first_pass"
751642eb1aSMark Murray.It Cm use_first_pass
761642eb1aSMark MurrayIf the authentication module
771642eb1aSMark Murrayis not the first in the stack,
781642eb1aSMark Murrayand a previous module
791642eb1aSMark Murrayobtained the user's password,
801642eb1aSMark Murraythat password is used
811642eb1aSMark Murrayto authenticate the user.
821642eb1aSMark MurrayIf this fails,
831642eb1aSMark Murraythe authentication module returns failure
841642eb1aSMark Murraywithout prompting the user for a password.
851642eb1aSMark MurrayThis option has no effect
861642eb1aSMark Murrayif the authentication module
871642eb1aSMark Murrayis the first in the stack,
881642eb1aSMark Murrayor if no previous modules
891642eb1aSMark Murrayobtained the user's password.
901642eb1aSMark Murray.It Cm try_first_pass
911642eb1aSMark MurrayThis option is similar to the
921642eb1aSMark Murray.Cm use_first_pass
931642eb1aSMark Murrayoption,
941642eb1aSMark Murrayexcept that if the previously obtained password fails,
951642eb1aSMark Murraythe user is prompted for another password.
96c777c69bSDag-Erling Smørgrav.It Cm nullok
97c777c69bSDag-Erling SmørgravNormally, keys with no passphrase are ignored for authentication
98c777c69bSDag-Erling Smørgravpurposes.
99c777c69bSDag-Erling SmørgravIf this option is set, keys with no passphrase will be taken into
100c777c69bSDag-Erling Smørgravconsideration, allowing the user to log in with a blank password.
1011642eb1aSMark Murray.El
102b4a47593SDag-Erling Smørgrav.Ss SSH Session Management Module
1031642eb1aSMark MurrayThe
10460c67361SRuslan ErmilovSSH
105b4a47593SDag-Erling Smørgravsession management component
106b4a47593SDag-Erling Smørgravprovides functions to initiate
107b4a47593SDag-Erling Smørgrav.Pq Fn pam_sm_open_session
108b4a47593SDag-Erling Smørgravand terminate
109b4a47593SDag-Erling Smørgrav.Pq Fn pam_sm_close_session
110b4a47593SDag-Erling Smørgravsessions.
111b4a47593SDag-Erling SmørgravThe
112b4a47593SDag-Erling Smørgrav.Fn pam_sm_open_session
113b4a47593SDag-Erling Smørgravfunction starts an SSH agent,
114b4a47593SDag-Erling Smørgravpassing it any private keys it decrypted
115b4a47593SDag-Erling Smørgravduring the authentication phase,
116b4a47593SDag-Erling Smørgravand sets the environment variables
117b4a47593SDag-Erling Smørgravthe agent specifies.
118b4a47593SDag-Erling SmørgravThe
119b4a47593SDag-Erling Smørgrav.Fn pam_sm_close_session
120b4a47593SDag-Erling Smørgravfunction kills the previously started SSH agent
121b4a47593SDag-Erling Smørgravby sending it a
122b4a47593SDag-Erling Smørgrav.Dv SIGTERM .
1231642eb1aSMark Murray.Pp
124b4a47593SDag-Erling SmørgravThe following options may be passed to the session management module:
125d9027819SDag-Erling Smørgrav.Bl -tag -width ".Cm want_agent"
126d9027819SDag-Erling Smørgrav.It Cm want_agent
127d9027819SDag-Erling SmørgravStart an agent even if no keys were decrypted during the
128d9027819SDag-Erling Smørgravauthentication phase.
1291642eb1aSMark Murray.El
1301642eb1aSMark Murray.Sh FILES
131d9027819SDag-Erling Smørgrav.Bl -tag -width ".Pa $HOME/.ssh/identity" -compact
132b4a47593SDag-Erling Smørgrav.It Pa $HOME/.ssh/identity
133d9027819SDag-Erling SmørgravSSH1 RSA key
134d9027819SDag-Erling Smørgrav.It Pa $HOME/.ssh/id_rsa
135d9027819SDag-Erling SmørgravSSH2 RSA key
136b4a47593SDag-Erling Smørgrav.It Pa $HOME/.ssh/id_dsa
137d9027819SDag-Erling SmørgravSSH2 DSA key
1381642eb1aSMark Murray.El
1391642eb1aSMark Murray.Sh SEE ALSO
140b4a47593SDag-Erling Smørgrav.Xr ssh-agent 1 ,
14160c67361SRuslan Ermilov.Xr pam.conf 5 ,
14260c67361SRuslan Ermilov.Xr pam 8
14332f0c048SDag-Erling Smørgrav.Sh AUTHORS
144d9027819SDag-Erling SmørgravThe
145d9027819SDag-Erling Smørgrav.Nm
146d9027819SDag-Erling Smørgravmodule was originally written by
14732f0c048SDag-Erling Smørgrav.An -nosplit
148d9027819SDag-Erling Smørgrav.An "Andrew J. Korty" Aq ajk@iu.edu .
149d9027819SDag-Erling SmørgravThe current implementation was developed for the
150d9027819SDag-Erling Smørgrav.Fx
151d9027819SDag-Erling SmørgravProject by
152d9027819SDag-Erling SmørgravThinkSec AS and NAI Labs, the Security Research Division of Network
1531a0a9345SRuslan ErmilovAssociates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
154d9027819SDag-Erling Smørgrav.Pq Dq CBOSS ,
155d9027819SDag-Erling Smørgravas part of the DARPA CHATS research program.
156d9027819SDag-Erling SmørgravThis manual page was written by
157522ccf3fSRuslan Ermilov.An "Mark R V Murray" Aq markm@FreeBSD.org .
158