Using the SSH_AGENT Utility
The SSH_AGENT utility starts the SSH authentication agent to use an SSH client that is configured to use public-key user authentication. Because the authentication agent holds private keys in memory, the user does not need to enter a passphrase if one exists for the key being used. As long as the agent is running, all key-related operations are directed to the agent. On startup, the agent does not hold any private keys. Keys are added by using the SSH_ADD command. Several identities can be stored in the agent, and the agent can use any of these identities automatically. The command SSH_ADD -l displays the identities currently held by the agent. When the SSH agent starts up, it assigns the logical name TCPIP$SSH_AGENT_PORT in the process job table, which is shared by a process and its subprocesses. Client programs use this value to start communication with the agent, in turn assigning the logical name TCPIP$SSH_CLIENT_PORT. The agent uses the latter logical name to check that the client is a valid user on the same job (that is, in the parent of the agent subprocess). The agent terminates when the user logs out or stops the agent. Table 7–6 describes the options you can use with the SSH_AGENT command. Table 7-6 SSH_AGENT Command Options
The following example shows a normal agent startup and displays the value of the TCPIP$SSH_AGENT_PORT logical name:
The following example shows an attempt to start a second agent within the same parent process.
The following example shows the message displayed when a client not in the current user's job attempts to connect to the user's agent subprocess:
|