Home | man(1)


is a program to hold private keys used for public key authentica‐
tion.   Through use of environment variables the agent can be lo‐
cated and automatically used for authentication when  logging  in
to  other  machines  using  The  options are as follows: Bind the
agent to the socket The default is Generate C-shell  commands  on
standard  output.   This  is the default if looks like it's a csh
style of shell.  Foreground mode.  When this option is specified,
will not fork.  Debug mode.  When this option is specified,  will
not  fork  and  will  write  debug information to standard error.
Specifies the hash algorithm used  when  displaying  key  finger‐
prints.   Valid  options are: and The default is Kill the current
agent (given by the environment  variable).   Specify  an  option
when  starting  The  supported options are: and The option allows
clients of a forwarded to  load  PKCS#11  or  FIDO  provider  li‐
braries.   By  default only local clients may perform this opera‐
tion.  Note that signalling that an client is remote is performed
by and use of other tools to forward access to the  agent  socket
may  circumvent this restriction.  The option instructs to permit
signatures using FIDO keys that might be web  authentication  re‐
quests.   By  default,  refuses  signature requests for FIDO keys
where the key application string does not start with and when the
data to be signed does not appear to be a user authentication re‐
quest or a signature.  The default behaviour  prevents  forwarded
access  to a FIDO key from also implicitly forwarding the ability
to authenticate to websites.  Alternately the option allows spec‐
ifying a pattern-list of key application strings to  replace  the
default  application allow-list, for example: See PATTERNS in for
a description of pattern-list syntax.  Specify a pattern-list  of
acceptable paths for PKCS#11 provider and FIDO authenticator mid‐
dleware  shared libraries that may be used with the or options to
Libraries that do not match the pattern  list  will  be  refused.
The default list is See PATTERNS in for a description of pattern-
list  syntax.  Generate Bourne shell commands on standard output.
This is the default if does not look like it's  a  csh  style  of
shell.   Set  a default value for the maximum lifetime of identi‐
ties added to the agent.  The lifetime may be specified  in  sec‐
onds or in a time format specified in A lifetime specified for an
identity  with overrides this value.  Without this option the de‐
fault maximum lifetime is forever.  If a  command  (and  optional
arguments)  is  given,  this  is  executed as a subprocess of the
agent.  The agent exits automatically when the command  given  on
the command line terminates.  There are three main ways to get an
agent  set  up.  The first is at the start of an X session, where
all other windows or programs are started as children of the pro‐
gram.  The agent starts a command  under  which  its  environment
variables  are exported, for example When the command terminates,
so does the agent.  The second method is used for  a  login  ses‐
sion.   When is started, it prints the shell commands required to
set its environment variables, which in turn can be evaluated  in
the  calling  shell, for example In both of these cases, looks at
these environment variables and uses them to establish a  connec‐
tion to the agent.  The third way to run is via socket activation
from  a  supervising process, such as systemd.  In this mode, the
supervising process creates the listening socket and is responsi‐
ble for starting as needed, and also for communicating the  loca‐
tion  of the socket listener to other programs in the user's ses‐
sion.  Socket activation is used when is started with  either  of
the  or flags, no socket listening address specified by the flag,
and both the and environment variables correctly supplied by  the
supervising  process.  The agent initially does not have any pri‐
vate keys.  Keys are added using or by when is  set  in  Multiple
identities  may  be stored in concurrently and will automatically
use them if present.  is also used to remove  keys  from  and  to
query  the keys that are held in one.  Connections to may be for‐
warded from further remote hosts using the option to (but see the
caveats documented therein), avoiding the need for authentication
data to be stored on other machines.  Authentication  passphrases
and private keys never go over the network: the connection to the
agent  is forwarded over SSH remote connections and the result is
returned to the requester, allowing  the  user  access  to  their
identities  anywhere  in  the  network in a secure fashion.  will
delete all keys it has loaded  upon  receiving  When  starts,  it
stores the name of the agent's process ID (PID) in this variable.
When  starts, it creates a socket and stores its pathname in this
variable.  It is accessible only to the current user, but is eas‐
ily abused by root or another instance of the same user.  In  De‐
bian,  is installed with the set-group-id bit set, to prevent at‐
tacks retrieving private key material.  This has the  side-effect
of  causing  the  run-time  linker  to remove certain environment
variables which might have security implications for set-id  pro‐
grams,  including and If you need to set any of these environment
variables, you will need to do so in the program executed by ssh-
agent.  sockets used to contain the connection to the authentica‐
tion agent.  These sockets should only be readable by the  owner.
The  sockets  should get automatically removed when the agent ex‐
its.  OpenSSH is a derivative of the original and free ssh 1.2.12
release by and removed many bugs,  re-added  newer  features  and
created  OpenSSH.   contributed the support for SSH protocol ver‐
sions 1.5 and 2.0.