Using the SSH_ADD Utility
The SSH_ADD utility adds private keys into the authentication agent. The authentication agent must have been started, usually with the SSH_AGENT utility, and must be running in a subprocess of the current process. If a private key requires a passphrase, the SSH_ADD utility prompts you to enter it. Passphrases never go over the network. For SSH_ADD to process a key, both the private and public key files must be present in the same directory. On OpenVMS, a public key file name must have the file extension .PUB (for example, MYKEY.PUB). A private key file name has no file extension (for example, MYKEY.). The files... parameter specifies one or more public or private key files to load. If you do not specify any key files, SSH_ADD reads the client configuration file (SSH2_CONFIG.) and the IDENTIFICATION. file. If these files do not exist, SSH_ADD exits with an error message. SSH_ADD adds the keys listed in the IDENTIFICATION. file. The utility then adds any private key files it finds in the user's SSH directory. Note that any file names in the SSH directory that begin with the letters "id" and that do not have the file extension .PUB are assumed to be key files. For example, a file named id_22.txt causes SSH_ADD to fail. Table 7–5 describes the options you can use with the SSH_ADD command. Table 7-5 SSH_ADD Command Options
SSH_ADD returns one of the following exit codes in the case of an error:
|