[BACK]Return to ssh-agent.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Annotation of src/usr.bin/ssh/ssh-agent.1, Revision 1.75

1.75    ! jmc         1: .\" $OpenBSD: ssh-agent.1,v 1.74 2022/10/07 04:06:26 djm Exp $
1.7       markus      2: .\"
1.16      deraadt     3: .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
                      4: .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
                      5: .\"                    All rights reserved
1.1       deraadt     6: .\"
1.16      deraadt     7: .\" As far as I am concerned, the code I have written for this software
                      8: .\" can be used freely for any purpose.  Any derived versions of this
                      9: .\" software must be clearly marked as such, and if the derived work is
                     10: .\" incompatible with the protocol description in the RFC file, it must be
                     11: .\" called by a name other than "ssh" or "Secure Shell".
1.1       deraadt    12: .\"
1.22      deraadt    13: .\" Copyright (c) 1999,2000 Markus Friedl.  All rights reserved.
                     14: .\" Copyright (c) 1999 Aaron Campbell.  All rights reserved.
                     15: .\" Copyright (c) 1999 Theo de Raadt.  All rights reserved.
1.8       deraadt    16: .\"
1.16      deraadt    17: .\" Redistribution and use in source and binary forms, with or without
                     18: .\" modification, are permitted provided that the following conditions
                     19: .\" are met:
                     20: .\" 1. Redistributions of source code must retain the above copyright
                     21: .\"    notice, this list of conditions and the following disclaimer.
                     22: .\" 2. Redistributions in binary form must reproduce the above copyright
                     23: .\"    notice, this list of conditions and the following disclaimer in the
                     24: .\"    documentation and/or other materials provided with the distribution.
1.1       deraadt    25: .\"
1.16      deraadt    26: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     27: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     28: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     29: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     30: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     31: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     32: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     33: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     34: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     35: .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.1       deraadt    36: .\"
1.75    ! jmc        37: .Dd $Mdocdate: October 7 2022 $
1.2       deraadt    38: .Dt SSH-AGENT 1
                     39: .Os
                     40: .Sh NAME
                     41: .Nm ssh-agent
1.69      jmc        42: .Nd OpenSSH authentication agent
1.2       deraadt    43: .Sh SYNOPSIS
1.11      aaron      44: .Nm ssh-agent
1.52      jmc        45: .Op Fl c | s
1.67      jmc        46: .Op Fl \&Dd
1.32      markus     47: .Op Fl a Ar bind_address
1.57      djm        48: .Op Fl E Ar fingerprint_hash
1.74      djm        49: .Op Fl O Ar option
1.72      djm        50: .Op Fl P Ar allowed_providers
1.36      marc       51: .Op Fl t Ar life
1.71      dtucker    52: .Nm ssh-agent
                     53: .Op Fl a Ar bind_address
                     54: .Op Fl E Ar fingerprint_hash
1.74      djm        55: .Op Fl O Ar option
1.72      djm        56: .Op Fl P Ar allowed_providers
1.71      dtucker    57: .Op Fl t Ar life
                     58: .Ar command Op Ar arg ...
1.67      jmc        59: .Nm ssh-agent
                     60: .Op Fl c | s
                     61: .Fl k
1.11      aaron      62: .Sh DESCRIPTION
1.2       deraadt    63: .Nm
1.68      jmc        64: is a program to hold private keys used for public key authentication.
1.10      aaron      65: Through use of environment variables the agent can be located
1.14      markus     66: and automatically used for authentication when logging in to other
1.1       deraadt    67: machines using
1.2       deraadt    68: .Xr ssh 1 .
                     69: .Pp
1.7       markus     70: The options are as follows:
                     71: .Bl -tag -width Ds
1.32      markus     72: .It Fl a Ar bind_address
1.48      sobrado    73: Bind the agent to the
1.49      sobrado    74: .Ux Ns -domain
                     75: socket
1.32      markus     76: .Ar bind_address .
                     77: The default is
1.53      djm        78: .Pa $TMPDIR/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt .
1.7       markus     79: .It Fl c
                     80: Generate C-shell commands on
                     81: .Dv stdout .
                     82: This is the default if
                     83: .Ev SHELL
                     84: looks like it's a csh style of shell.
1.58      djm        85: .It Fl D
                     86: Foreground mode.
1.73      naddy      87: When this option is specified,
1.58      djm        88: .Nm
                     89: will not fork.
1.46      sobrado    90: .It Fl d
                     91: Debug mode.
1.73      naddy      92: When this option is specified,
1.46      sobrado    93: .Nm
1.58      djm        94: will not fork and will write debug information to standard error.
1.57      djm        95: .It Fl E Ar fingerprint_hash
                     96: Specifies the hash algorithm used when displaying key fingerprints.
                     97: Valid options are:
                     98: .Dq md5
                     99: and
                    100: .Dq sha256 .
                    101: The default is
                    102: .Dq sha256 .
1.46      sobrado   103: .It Fl k
                    104: Kill the current agent (given by the
                    105: .Ev SSH_AGENT_PID
                    106: environment variable).
1.74      djm       107: .It Fl O Ar option
                    108: Specify an option when starting
1.75    ! jmc       109: .Nm .
1.74      djm       110: Currently only one option is supported:
                    111: .Cm no-restrict-websafe .
                    112: This instructs
1.75    ! jmc       113: .Nm
1.74      djm       114: to permit signatures using FIDO keys that might be web authentication
                    115: requests.
                    116: By default,
1.75    ! jmc       117: .Nm
1.74      djm       118: refuses signature requests for FIDO keys where the key application string
                    119: does not start with
                    120: .Dq ssh:
                    121: and when the data to be signed does not appear to be a
                    122: .Xr ssh 1
                    123: user authentication request or a
                    124: .Xr ssh-keygen 1
                    125: signature.
                    126: The default behaviour prevents forwarded access to a FIDO key from also
                    127: implicitly forwarding the ability to authenticate to websites.
1.72      djm       128: .It Fl P Ar allowed_providers
                    129: Specify a pattern-list of acceptable paths for PKCS#11 provider and FIDO
                    130: authenticator middleware shared libraries that may be used with the
1.68      jmc       131: .Fl S
                    132: or
1.63      djm       133: .Fl s
1.65      djm       134: options to
1.63      djm       135: .Xr ssh-add 1 .
1.72      djm       136: Libraries that do not match the pattern list will be refused.
1.63      djm       137: See PATTERNS in
                    138: .Xr ssh_config 5
                    139: for a description of pattern-list syntax.
1.72      djm       140: The default list is
1.68      jmc       141: .Dq /usr/lib/*,/usr/local/lib/* .
1.7       markus    142: .It Fl s
                    143: Generate Bourne shell commands on
                    144: .Dv stdout .
                    145: This is the default if
                    146: .Ev SHELL
                    147: does not look like it's a csh style of shell.
1.36      marc      148: .It Fl t Ar life
1.37      jmc       149: Set a default value for the maximum lifetime of identities added to the agent.
1.36      marc      150: The lifetime may be specified in seconds or in a time format specified in
1.43      dtucker   151: .Xr sshd_config 5 .
1.36      marc      152: A lifetime specified for an identity with
                    153: .Xr ssh-add 1
                    154: overrides this value.
                    155: Without this option the default maximum lifetime is forever.
1.68      jmc       156: .It Ar command Op Ar arg ...
                    157: If a command (and optional arguments) is given,
                    158: this is executed as a subprocess of the agent.
                    159: The agent exits automatically when the command given on the command
                    160: line terminates.
1.7       markus    161: .El
                    162: .Pp
1.68      jmc       163: There are two main ways to get an agent set up.
                    164: The first is at the start of an X session,
                    165: where all other windows or programs are started as children of the
                    166: .Nm
                    167: program.
                    168: The agent starts a command under which its environment
                    169: variables are exported, for example
                    170: .Cm ssh-agent xterm & .
                    171: When the command terminates, so does the agent.
1.7       markus    172: .Pp
1.68      jmc       173: The second method is used for a login session.
                    174: When
                    175: .Nm
                    176: is started,
                    177: it prints the shell commands required to set its environment variables,
                    178: which in turn can be evaluated in the calling shell, for example
                    179: .Cm eval `ssh-agent -s` .
1.40      dtucker   180: .Pp
1.68      jmc       181: In both cases,
1.7       markus    182: .Xr ssh 1
1.75    ! jmc       183: looks at these environment variables
        !           184: and uses them to establish a connection to the agent.
1.29      stevesk   185: .Pp
1.68      jmc       186: The agent initially does not have any private keys.
                    187: Keys are added using
                    188: .Xr ssh-add 1
                    189: or by
                    190: .Xr ssh 1
                    191: when
                    192: .Cm AddKeysToAgent
                    193: is set in
                    194: .Xr ssh_config 5 .
                    195: Multiple identities may be stored in
                    196: .Nm
                    197: concurrently and
                    198: .Xr ssh 1
                    199: will automatically use them if present.
                    200: .Xr ssh-add 1
                    201: is also used to remove keys from
                    202: .Nm
                    203: and to query the keys that are held in one.
1.7       markus    204: .Pp
1.68      jmc       205: Connections to
                    206: .Nm
                    207: may be forwarded from further remote hosts using the
                    208: .Fl A
                    209: option to
                    210: .Xr ssh 1
                    211: (but see the caveats documented therein),
                    212: avoiding the need for authentication data to be stored on other machines.
                    213: Authentication passphrases and private keys never go over the network:
                    214: the connection to the agent is forwarded over SSH remote connections
                    215: and the result is returned to the requester,
                    216: allowing the user access to their identities anywhere in the network
                    217: in a secure fashion.
                    218: .Sh ENVIRONMENT
                    219: .Bl -tag -width "SSH_AGENT_PID"
                    220: .It Ev SSH_AGENT_PID
                    221: When
                    222: .Nm
                    223: starts, it stores the name of the agent's process ID (PID) in this variable.
                    224: .It Ev SSH_AUTH_SOCK
                    225: When
                    226: .Nm
                    227: starts, it creates a
1.49      sobrado   228: .Ux Ns -domain
1.68      jmc       229: socket and stores its pathname in this variable.
                    230: It is accessible only to the current user,
                    231: but is easily abused by root or another instance of the same user.
                    232: .El
1.2       deraadt   233: .Sh FILES
                    234: .Bl -tag -width Ds
1.64      jmc       235: .It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>
1.49      sobrado   236: .Ux Ns -domain
                    237: sockets used to contain the connection to the authentication agent.
1.10      aaron     238: These sockets should only be readable by the owner.
                    239: The sockets should get automatically removed when the agent exits.
1.13      aaron     240: .El
1.39      jmc       241: .Sh SEE ALSO
                    242: .Xr ssh 1 ,
                    243: .Xr ssh-add 1 ,
                    244: .Xr ssh-keygen 1 ,
1.68      jmc       245: .Xr ssh_config 5 ,
1.39      jmc       246: .Xr sshd 8
1.17      aaron     247: .Sh AUTHORS
1.64      jmc       248: .An -nosplit
                    249: OpenSSH is a derivative of the original and free ssh 1.2.12 release by
                    250: .An Tatu Ylonen .
                    251: .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , Theo de Raadt
                    252: and
                    253: .An Dug Song
                    254: removed many bugs, re-added newer features and created OpenSSH.
                    255: .An Markus Friedl
                    256: contributed the support for SSH protocol versions 1.5 and 2.0.