Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ssh-add(1) — Tru64 UNIX 5.1b

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ssh2(1)

ssh-agent2(1)

ssh-keygen2(1)

ssh-add2(1)  —  Commands

NAME

ssh-add2, ssh-add − Adds private keys into the authentication agent

SYNOPSIS

ssh-add2 [−p] [−l] [−N] [−P] [−F] [−d] [−D] [−L] [−U] [−l] [−u] [−f forwarding_steps] [−F forwarding_constraint] [−t timeout] [−R OpenPGP_keyring] [file . . .]

OPTIONS

−pReads passphrase from stdin (or pipe). 

−lLists all identities currently represented by the agent. 

−NKeys added or deleted are stored in the OpenPGP key ring and identified by the key name string. 

−PKeys added or deleted are stored in the OpenPGP key ring and identified by the key fingerprint. 

−FKeys added or deleted are stored in the OpenPGP key ring and identified by the key ID number. 

−dRemoves the identity from the agent. 

−DDeletes all identities from the agent. 

−LTemporarily locks the agent with a password. 

−UUnlocks the locked agent. 

−1Specifies that the agent is not allowed to use keys added with this command in ssh1 compatibility operations. 

−uSpecifies that the key added is not read from the file, but instead the key is given to the agent as an URL.  With this option, the agent can get information about the additional key sources, like smart cards. 

−f forwarding_steps
Specifies that the key can be used only through as many forwarding steps as directed by the argument.  Argument 0 states that the key can be used only locally. Note that ssh1 does not submit forwarding information; therefore, this option might not work as expected with ssh1 compatibility. 

−F forwarding_constraint
Specifies a comma-separated list of host name patterns through which the key can be forwarded.  For example, the forwarding constraint string of ∗.ssh.com,server1.iki.fi states that the key can be forwarded to any host in domain ssh.com and host server1.iki.fi and used locally. Note that ssh1 does not submit forwarding information; therefore, this option might not work as expected with ssh1 compatibility. 

−t timeout
Specifies the amount of time (in minutes) that the agent is to wait before deleting the key.

−R OpenPGP_keyring
Specifies the OpenPGP secret key ring file.

DESCRIPTION

The ssh-add2 command adds private keys into the authentication agent, ssh-agent2. The authentication agent must be running and must be an ancestor of the current process. 

If a private key requires a passphrase, the ssh-add2 command prompts the user for the passphrase.  If the user is using a terminal, the passphrase is requested in the terminal window. If the user is using X11, the passphrase is requested in an X11 window. This feature is useful when calling the ssh-add2 command from an .Xsession or a related script.  It might be necessary to redirect input from /dev/null to get the passphrase requested using X11. 

RETURN STATUS

The ssh-add2 command returns one of the following exit values.  These can be useful in scripts. 

0The requested operation was performed successfully. 

1No connection could be made to the authentication agent.  Presumably there is no authentication agent active in the execution environment of the ssh-add2 command. 

2The user did not supply a required passphrase. 

3An identity file could not be found, was not readable, or was in bad format. 

4The agent does not have the requested identity. 

5An unspecified error has occurred; this is for errors not listed previously. 

FILES

$HOME/.ssh2/identification
Contains the names of the private keys to be used in authentication.

$HOME/.ssh2/id_KEYTYPE_KEYLEN_x for example id_dsa_1024_a
Contains the user’s private key.

$HOME/.ssh2/id_KEYTYPE_KEYLEN_x.pub for example id_dsa_1024_a.pub
Contains the user’s public key.

LEGAL NOTICES

SSH is a registered trademark of SSH Communication Security Ltd. 

SEE ALSO

Commands: ssh2(1), ssh-agent2(1), ssh-keygen2(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026