Blob
1 .TH SSH-AGENT 12 .SH NAME3 ssh-agent \- SSH authentication agent4 .SH SYNOPSIS5 .B ssh-agent6 [7 .B -l8 ]9 .I factotum-service10 .SH DESCRIPTION11 .I Ssh-agent12 presents13 .IR factotum (4)14 using the interface that15 .IR ssh (1)16 requires.17 .PP18 Once19 .I ssh-agent20 and21 .I factotum22 are running, the standard Unix SSH client23 can use24 .I ssh-agent25 (and, indirectly,26 .IR factotum )27 to authenticate to remote systems using RSA or DSA keys.28 .PP29 .I Ssh30 accesses31 .I ssh-agent32 via a Unix socket posted in a private subdirectory of33 .B /tmp .34 .I Ssh35 expects this socket to be in the environment as36 .BR $SSH_AGENT_SOCK ,37 and expects the agent to be running with process id38 .BR $SSH_AGENT_PID .39 .I Ssh-agent40 prints shell commands to set these two variables41 before forking itself into the background.42 It is typically invoked inside a shell43 .B eval44 construct; see the examples below.45 The46 .B -e47 option causes48 .I ssh-agent49 to include50 .B export51 commands to put the variables into the environment of future programs.52 .PP53 If the54 .B -l55 option is given,56 .I ssh-agent57 lists the usable58 .I factotum59 keys in the standard SSH format, suitable for creating an60 .B authorized_keys61 file.62 .PP63 .I Ssh-agent64 connects to65 .I factotum66 by accessing67 .I factotum-service68 (default69 .RB ` factotum ')70 in the current name space.71 .PP72 There is a Unix program called73 .I ssh-agent74 that manages SSH keys itself.75 Invoke this one with76 .B 977 .BR ssh-agent ;78 see79 .IR 9 (1).80 .SH EXAMPLES81 Assume82 .IR factotum (4)83 is already running and initialized with keys.84 .PP85 Start a new agent, copying the commands by hand:86 .IP87 .EX88 $ 9 ssh-agent -e89 SSH_AUTH_SOCK=/tmp/ssh-405795003d7ee27a/agent.4233;90 export SSH_AUTH_SOCK;91 SSH_AGENT_PID=4233;92 export SSH_AGENT_PID;93 $ SSH_AUTH_SOCK=/tmp/ssh-405795003d7ee27a/agent.4233;94 $ export SSH_AUTH_SOCK;95 $ SSH_AGENT_PID=4233;96 $ export SSH_AGENT_PID;97 $98 .EE99 .PP100 Start the agent from101 .IR sh (1):102 .IP103 .EX104 $ eval `9 ssh-agent -e`105 $106 .EE107 .PP108 Start the agent from109 .IR rc (1):110 .IP111 .EX112 % eval `{9 ssh-agent}113 %114 .EE115 .PP116 Use the agent to connect to a remote system:117 .IP118 .EX119 % ssh tux120 tux% ^D121 %122 .EE123 .SH SOURCE124 .B \*9/src/cmd/auth/ssh-agent.c125 .SH SEE ALSO126 .IR ssh (1),127 .IR rsa (1),128 .IR factotum (4)129 .SH BUGS130 A surprise rather than a bug:131 .I ssh-agent132 connects to factotum on demand, so it can be133 started before134 .I factotum135 is running and need not be restarted just because136 .I factotum137 is.