1 '\" te 2 .\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the 3 .\" installed location. 4 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. 5 .TH SSH-AGENT 1 "Aug 17, 2009" 6 .SH NAME 7 ssh-agent \- authentication agent 8 .SH SYNOPSIS 9 .LP 10 .nf 11 \fBssh-agent\fR [\fB-a\fR \fIbind_address\fR] [\fB-c\fR | \fB-s\fR ] [\fB-d\fR] 12 [-t \fIlife\fR] [\fIcommand\fR [\fIargs\fR]...] 13 .fi 14 15 .LP 16 .nf 17 \fBssh-agent\fR [\fB-c\fR | \fB-s\fR] \fB-k\fR 18 .fi 19 20 .SH DESCRIPTION 21 .LP 22 \fBssh-agent\fR is a program to hold private keys used for public key 23 authentication (\fBRSA\fR, \fBDSA\fR). \fBssh-agent\fR is often started at the 24 beginning of a login session. All other windows or programs are started as 25 clients to the \fBssh-agent\fR program. Through use of environment variables, 26 the agent can be located and automatically used for authentication when logging 27 in to other machines using \fBssh\fR(1). See the \fISystem Administration 28 Guide: Security Services\fR. 29 .sp 30 .LP 31 If a command line is given, this is executed as a subprocess of the agent. When 32 the command dies, so does the agent. 33 .sp 34 .LP 35 The agent initially does not have any private keys. Keys are added using 36 \fBssh-add\fR(1), which sends the identity to the agent. Several identities can 37 be stored in the agent; the agent can automatically use any of these 38 identities. Use the \fB-l\fR option in \fBssh-add\fR(1) to display the 39 identities currently held by the agent. 40 .sp 41 .LP 42 The agent is run in the user's local host. Authentication data need not be 43 stored on any other machine, and authentication passphrases never go over the 44 network. However, if the connection to the agent is forwarded over \fBSSH\fR 45 remote logins, the user can use the privileges given by the identities anywhere 46 in the network in a secure way. 47 .sp 48 .LP 49 There are two main ways to get an agent setup. Either you let the agent start a 50 new subcommand into which some environment variables are exported, or you let 51 the agent print the needed shell commands (either \fBsh\fR(1) or \fBcsh\fR(1) 52 syntax can be generated) which can be evalled in the calling shell. Later, use 53 \fBssh\fR(1) to look at these variables and use them to establish a connection 54 to the agent. 55 .sp 56 .LP 57 A unix-domain socket is created (\fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR) and 58 the name of this socket is stored in the \fBSSH_AUTH_SOCK\fR environment 59 variable. The socket is made accessible only to the current user. This method 60 is easily abused by root or another instance of the same user. 61 .sp 62 .LP 63 The \fBSSH_AGENT_PID\fR environment variable holds the agent's \fBPID\fR. 64 .sp 65 .LP 66 The agent exits automatically when the command given on the command line 67 terminates. 68 .SH OPTIONS 69 .LP 70 The following options are supported: 71 .sp 72 .ne 2 73 .na 74 \fB\fB-a\fR \fIbind_address\fR\fR 75 .ad 76 .RS 19n 77 Binds the agent to the unix-domain socket bind_address. The default is 78 \fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR. 79 .RE 80 81 .sp 82 .ne 2 83 .na 84 \fB\fB-c\fR\fR 85 .ad 86 .RS 19n 87 Generates C-shell commands on stdout. This is the default if \fBSHELL\fR 88 indicates that it is a csh style of shell. 89 .RE 90 91 .sp 92 .ne 2 93 .na 94 \fB\fB-d\fR\fR 95 .ad 96 .RS 19n 97 Debug mode. When this option is specified, \fBssh-agent\fR does not fork. 98 .RE 99 100 .sp 101 .ne 2 102 .na 103 \fB\fB-k\fR\fR 104 .ad 105 .RS 19n 106 Kills the current agent (given by the \fBSSH_AGENT_PID\fR environment 107 variable). 108 .RE 109 110 .sp 111 .ne 2 112 .na 113 \fB\fB-s\fR\fR 114 .ad 115 .RS 19n 116 Generates Bourne shell commands on stdout. This is the default if \fBSHELL\fR 117 does not indicate that it is a csh style of shell. 118 .RE 119 120 .sp 121 .ne 2 122 .na 123 \fB\fB-t\fR \fIlife\fR\fR 124 .ad 125 .RS 19n 126 Set a default value for the maximum lifetime (\fIlife\fR) of identities added 127 to the agent. \fIlife\fR can be specified in seconds or in a time format 128 specified in \fBsshd_config\fR(4). \fIlife\fR specified for an identity with 129 \fBssh-add\fR(1) overrides this value. Without this option the default maximum 130 \fIlife\fR is forever. 131 .RE 132 133 .SH EXIT STATUS 134 .LP 135 The following exit values are returned: 136 .sp 137 .ne 2 138 .na 139 \fB\fB0\fR\fR 140 .ad 141 .RS 5n 142 Successful completion. 143 .RE 144 145 .sp 146 .ne 2 147 .na 148 \fB\fB1\fR\fR 149 .ad 150 .RS 5n 151 An error occurred. 152 .RE 153 154 .SH FILES 155 .ne 2 156 .na 157 \fB\fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR\fR 158 .ad 159 .sp .6 160 .RS 4n 161 Unix-domain sockets used to contain the connection to the authentication agent. 162 These sockets should only be readable by the owner. The sockets are removed 163 when the agent exits. 164 .RE 165 166 .SH ATTRIBUTES 167 .LP 168 See \fBattributes\fR(5) for descriptions of the following attributes: 169 .sp 170 171 .sp 172 .TS 173 box; 174 c | c 175 l | l . 176 ATTRIBUTE TYPE ATTRIBUTE VALUE 177 _ 178 Interface Stability Committed 179 .TE 180 181 .SH SEE ALSO 182 .LP 183 \fBssh\fR(1), \fBssh-add\fR(1), \fBssh-keygen\fR(1), \fBsshd\fR(1M), 184 \fBsshd_config\fR(4), \fBattributes\fR(5) 185 .sp 186 .LP 187 \fISystem Administration Guide: Security Services\fR