1SSH-AGENT(1)                General Commands Manual               SSH-AGENT(1)
2
3NAME
4     ssh-agent M-bM-^@M-^S authentication agent
5
6SYNOPSIS
7     ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]
8               [-t life] [command [arg ...]]
9     ssh-agent [-c | -s] -k
10
11DESCRIPTION
12     ssh-agent is a program to hold private keys used for public key
13     authentication (RSA, DSA, ECDSA, Ed25519).  ssh-agent is usually started
14     in the beginning of an X-session or a login session, and all other
15     windows or programs are started as clients to the ssh-agent program.
16     Through use of environment variables the agent can be located and
17     automatically used for authentication when logging in to other machines
18     using ssh(1).
19
20     The agent initially does not have any private keys.  Keys are added using
21     ssh-add(1).  Multiple identities may be stored in ssh-agent concurrently
22     and ssh(1) will automatically use them if present.  ssh-add(1) is also
23     used to remove keys from ssh-agent and to query the keys that are held in
24     one.
25
26     The options are as follows:
27
28     -a bind_address
29             Bind the agent to the UNIX-domain socket bind_address.  The
30             default is $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>.
31
32     -c      Generate C-shell commands on stdout.  This is the default if
33             SHELL looks like it's a csh style of shell.
34
35     -D      Foreground mode.  When this option is specified ssh-agent will
36             not fork.
37
38     -d      Debug mode.  When this option is specified ssh-agent will not
39             fork and will write debug information to standard error.
40
41     -E fingerprint_hash
42             Specifies the hash algorithm used when displaying key
43             fingerprints.  Valid options are: M-bM-^@M-^\md5M-bM-^@M-^] and M-bM-^@M-^\sha256M-bM-^@M-^].  The
44             default is M-bM-^@M-^\sha256M-bM-^@M-^].
45
46     -k      Kill the current agent (given by the SSH_AGENT_PID environment
47             variable).
48
49     -s      Generate Bourne shell commands on stdout.  This is the default if
50             SHELL does not look like it's a csh style of shell.
51
52     -t life
53             Set a default value for the maximum lifetime of identities added
54             to the agent.  The lifetime may be specified in seconds or in a
55             time format specified in sshd_config(5).  A lifetime specified
56             for an identity with ssh-add(1) overrides this value.  Without
57             this option the default maximum lifetime is forever.
58
59     If a commandline is given, this is executed as a subprocess of the agent.
60     When the command dies, so does the agent.
61
62     The idea is that the agent is run in the user's local PC, laptop, or
63     terminal.  Authentication data need not be stored on any other machine,
64     and authentication passphrases never go over the network.  However, the
65     connection to the agent is forwarded over SSH remote logins, and the user
66     can thus use the privileges given by the identities anywhere in the
67     network in a secure way.
68
69     There are two main ways to get an agent set up: The first is that the
70     agent starts a new subcommand into which some environment variables are
71     exported, eg ssh-agent xterm &.  The second is that the agent prints the
72     needed shell commands (either sh(1) or csh(1) syntax can be generated)
73     which can be evaluated in the calling shell, eg eval `ssh-agent -s` for
74     Bourne-type shells such as sh(1) or ksh(1) and eval `ssh-agent -c` for
75     csh(1) and derivatives.
76
77     Later ssh(1) looks at these variables and uses them to establish a
78     connection to the agent.
79
80     The agent will never send a private key over its request channel.
81     Instead, operations that require a private key will be performed by the
82     agent, and the result will be returned to the requester.  This way,
83     private keys are not exposed to clients using the agent.
84
85     A UNIX-domain socket is created and the name of this socket is stored in
86     the SSH_AUTH_SOCK environment variable.  The socket is made accessible
87     only to the current user.  This method is easily abused by root or
88     another instance of the same user.
89
90     The SSH_AGENT_PID environment variable holds the agent's process ID.
91
92     The agent exits automatically when the command given on the command line
93     terminates.
94
95FILES
96     $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>
97             UNIX-domain sockets used to contain the connection to the
98             authentication agent.  These sockets should only be readable by
99             the owner.  The sockets should get automatically removed when the
100             agent exits.
101
102SEE ALSO
103     ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
104
105AUTHORS
106     OpenSSH is a derivative of the original and free ssh 1.2.12 release by
107     Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
108     de Raadt and Dug Song removed many bugs, re-added newer features and
109     created OpenSSH.  Markus Friedl contributed the support for SSH protocol
110     versions 1.5 and 2.0.
111
112OpenBSD 5.8                     April 24, 2015                     OpenBSD 5.8
113