[16800] | 1 | |
---|
| 2 | SSH-AGENT(1) System Reference Manual SSH-AGENT(1) |
---|
| 3 | |
---|
| 4 | NAME |
---|
| 5 | ssh-agent - authentication agent |
---|
| 6 | |
---|
| 7 | SYNOPSIS |
---|
| 8 | ssh-agent [-c | -s] [-d] [command [args ...]] |
---|
| 9 | ssh-agent [-c | -s] -k |
---|
| 10 | |
---|
| 11 | DESCRIPTION |
---|
| 12 | ssh-agent is a program to hold private keys used for public key authentiM-- |
---|
| 13 | cation (RSA, DSA). The idea is that ssh-agent is started in the beginM-- |
---|
| 14 | ning of an X-session or a login session, and all other windows or proM-- |
---|
| 15 | grams are started as clients to the ssh-agent program. Through use of |
---|
| 16 | environment variables the agent can be located and automatically used for |
---|
| 17 | authentication when logging in to other machines using ssh(1). |
---|
| 18 | |
---|
| 19 | The options are as follows: |
---|
| 20 | |
---|
| 21 | -c Generate C-shell commands on stdout. This is the default if SHELL |
---|
| 22 | looks like it's a csh style of shell. |
---|
| 23 | |
---|
| 24 | -s Generate Bourne shell commands on stdout. This is the default if |
---|
| 25 | SHELL does not look like it's a csh style of shell. |
---|
| 26 | |
---|
| 27 | -k Kill the current agent (given by the SSH_AGENT_PID environment |
---|
| 28 | variable). |
---|
| 29 | |
---|
| 30 | -d Debug mode. When this option is specified ssh-agent will not |
---|
| 31 | fork. |
---|
| 32 | |
---|
| 33 | If a commandline is given, this is executed as a subprocess of the agent. |
---|
| 34 | When the command dies, so does the agent. |
---|
| 35 | |
---|
| 36 | The agent initially does not have any private keys. Keys are added using |
---|
| 37 | ssh-add(1). When executed without arguments, ssh-add(1) adds the |
---|
| 38 | $HOME/.ssh/identity file. If the identity has a passphrase, ssh-add(1) |
---|
| 39 | asks for the passphrase (using a small X11 application if running under |
---|
| 40 | X11, or from the terminal if running without X). It then sends the idenM-- |
---|
| 41 | tity to the agent. Several identities can be stored in the agent; the |
---|
| 42 | agent can automatically use any of these identities. ssh-add -l displays |
---|
| 43 | the identities currently held by the agent. |
---|
| 44 | |
---|
| 45 | The idea is that the agent is run in the user's local PC, laptop, or terM-- |
---|
| 46 | minal. Authentication data need not be stored on any other machine, and |
---|
| 47 | authentication passphrases never go over the network. However, the conM-- |
---|
| 48 | nection to the agent is forwarded over SSH remote logins, and the user |
---|
| 49 | can thus use the privileges given by the identities anywhere in the netM-- |
---|
| 50 | work in a secure way. |
---|
| 51 | |
---|
| 52 | There are two main ways to get an agent setup: Either the agent starts a |
---|
| 53 | new subcommand into which some environment variables are exported, or the |
---|
| 54 | agent prints the needed shell commands (either sh(1) or csh(1) syntax can |
---|
| 55 | be generated) which can be evalled in the calling shell. Later ssh(1) |
---|
| 56 | looks at these variables and uses them to establish a connection to the |
---|
| 57 | agent. |
---|
| 58 | |
---|
| 59 | A unix-domain socket is created (/tmp/ssh-XXXXXXXX/agent.<pid>), and the |
---|
| 60 | name of this socket is stored in the SSH_AUTH_SOCK environment variable. |
---|
| 61 | The socket is made accessible only to the current user. This method is |
---|
| 62 | easily abused by root or another instance of the same user. |
---|
| 63 | |
---|
| 64 | The SSH_AGENT_PID environment variable holds the agent's PID. |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | The agent exits automatically when the command given on the command line |
---|
| 68 | terminates. |
---|
| 69 | |
---|
| 70 | FILES |
---|
| 71 | $HOME/.ssh/identity |
---|
| 72 | Contains the protocol version 1 RSA authentication identity of |
---|
| 73 | the user. This file should not be readable by anyone but the usM-- |
---|
| 74 | er. It is possible to specify a passphrase when generating the |
---|
| 75 | key; that passphrase will be used to encrypt the private part of |
---|
| 76 | this file. This file is not used by ssh-agent but is normally |
---|
| 77 | added to the agent using ssh-add(1) at login time. |
---|
| 78 | |
---|
| 79 | $HOME/.ssh/id_dsa |
---|
| 80 | Contains the protocol version 2 DSA authentication identity of |
---|
| 81 | the user. |
---|
| 82 | |
---|
| 83 | $HOME/.ssh/id_rsa |
---|
| 84 | Contains the protocol version 2 RSA authentication identity of |
---|
| 85 | the user. |
---|
| 86 | |
---|
| 87 | /tmp/ssh-XXXXXXXX/agent.<pid> |
---|
| 88 | Unix-domain sockets used to contain the connection to the authenM-- |
---|
| 89 | tication agent. These sockets should only be readable by the |
---|
| 90 | owner. The sockets should get automatically removed when the |
---|
| 91 | agent exits. |
---|
| 92 | |
---|
| 93 | AUTHORS |
---|
| 94 | OpenSSH is a derivative of the original and free ssh 1.2.12 release by |
---|
| 95 | Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo |
---|
| 96 | de Raadt and Dug Song removed many bugs, re-added newer features and creM-- |
---|
| 97 | ated OpenSSH. Markus Friedl contributed the support for SSH protocol |
---|
| 98 | versions 1.5 and 2.0. |
---|
| 99 | |
---|
| 100 | SEE ALSO |
---|
| 101 | ssh(1), ssh-add(1), ssh-keygen(1), sshd(8) |
---|
| 102 | |
---|
| 103 | BSD Experimental September 25, 1999 2 |
---|