summaryrefslogtreecommitdiff
path: root/ssh-add.0
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-add.0')
-rw-r--r--ssh-add.0133
1 files changed, 133 insertions, 0 deletions
diff --git a/ssh-add.0 b/ssh-add.0
new file mode 100644
index 000000000..c614a2fe5
--- /dev/null
+++ b/ssh-add.0
@@ -0,0 +1,133 @@
1SSH-ADD(1) General Commands Manual SSH-ADD(1)
2
3NAME
4 ssh-add M-bM-^@M-^S adds private key identities to the authentication agent
5
6SYNOPSIS
7 ssh-add [-cDdkLlqvXx] [-E fingerprint_hash] [-t life] [file ...]
8 ssh-add -s pkcs11
9 ssh-add -e pkcs11
10 ssh-add -T pubkey ...
11
12DESCRIPTION
13 ssh-add adds private key identities to the authentication agent,
14 ssh-agent(1). When run without arguments, it adds the files
15 ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, and ~/.ssh/id_ed25519.
16 After loading a private key, ssh-add will try to load corresponding
17 certificate information from the filename obtained by appending -cert.pub
18 to the name of the private key file. Alternative file names can be given
19 on the command line.
20
21 If any file requires a passphrase, ssh-add asks for the passphrase from
22 the user. The passphrase is read from the user's tty. ssh-add retries
23 the last passphrase if multiple identity files are given.
24
25 The authentication agent must be running and the SSH_AUTH_SOCK
26 environment variable must contain the name of its socket for ssh-add to
27 work.
28
29 The options are as follows:
30
31 -c Indicates that added identities should be subject to confirmation
32 before being used for authentication. Confirmation is performed
33 by ssh-askpass(1). Successful confirmation is signaled by a zero
34 exit status from ssh-askpass(1), rather than text entered into
35 the requester.
36
37 -D Deletes all identities from the agent.
38
39 -d Instead of adding identities, removes identities from the agent.
40 If ssh-add has been run without arguments, the keys for the
41 default identities and their corresponding certificates will be
42 removed. Otherwise, the argument list will be interpreted as a
43 list of paths to public key files to specify keys and
44 certificates to be removed from the agent. If no public key is
45 found at a given path, ssh-add will append .pub and retry.
46
47 -E fingerprint_hash
48 Specifies the hash algorithm used when displaying key
49 fingerprints. Valid options are: M-bM-^@M-^\md5M-bM-^@M-^] and M-bM-^@M-^\sha256M-bM-^@M-^]. The
50 default is M-bM-^@M-^\sha256M-bM-^@M-^].
51
52 -e pkcs11
53 Remove keys provided by the PKCS#11 shared library pkcs11.
54
55 -k When loading keys into or deleting keys from the agent, process
56 plain private keys only and skip certificates.
57
58 -L Lists public key parameters of all identities currently
59 represented by the agent.
60
61 -l Lists fingerprints of all identities currently represented by the
62 agent.
63
64 -q Be quiet after a successful operation.
65
66 -s pkcs11
67 Add keys provided by the PKCS#11 shared library pkcs11.
68
69 -T pubkey ...
70 Tests whether the private keys that correspond to the specified
71 pubkey files are usable by performing sign and verify operations
72 on each.
73
74 -t life
75 Set a maximum lifetime when adding identities to an agent. The
76 lifetime may be specified in seconds or in a time format
77 specified in sshd_config(5).
78
79 -v Verbose mode. Causes ssh-add to print debugging messages about
80 its progress. This is helpful in debugging problems. Multiple
81 -v options increase the verbosity. The maximum is 3.
82
83 -X Unlock the agent.
84
85 -x Lock the agent with a password.
86
87ENVIRONMENT
88 DISPLAY and SSH_ASKPASS
89 If ssh-add needs a passphrase, it will read the passphrase from
90 the current terminal if it was run from a terminal. If ssh-add
91 does not have a terminal associated with it but DISPLAY and
92 SSH_ASKPASS are set, it will execute the program specified by
93 SSH_ASKPASS (by default M-bM-^@M-^\ssh-askpassM-bM-^@M-^]) and open an X11 window to
94 read the passphrase. This is particularly useful when calling
95 ssh-add from a .xsession or related script. (Note that on some
96 machines it may be necessary to redirect the input from /dev/null
97 to make this work.)
98
99 SSH_AUTH_SOCK
100 Identifies the path of a UNIX-domain socket used to communicate
101 with the agent.
102
103FILES
104 ~/.ssh/id_dsa
105 Contains the DSA authentication identity of the user.
106
107 ~/.ssh/id_ecdsa
108 Contains the ECDSA authentication identity of the user.
109
110 ~/.ssh/id_ed25519
111 Contains the Ed25519 authentication identity of the user.
112
113 ~/.ssh/id_rsa
114 Contains the RSA authentication identity of the user.
115
116 Identity files should not be readable by anyone but the user. Note that
117 ssh-add ignores identity files if they are accessible by others.
118
119EXIT STATUS
120 Exit status is 0 on success, 1 if the specified command fails, and 2 if
121 ssh-add is unable to contact the authentication agent.
122
123SEE ALSO
124 ssh(1), ssh-agent(1), ssh-askpass(1), ssh-keygen(1), sshd(8)
125
126AUTHORS
127 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
128 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
129 de Raadt and Dug Song removed many bugs, re-added newer features and
130 created OpenSSH. Markus Friedl contributed the support for SSH protocol
131 versions 1.5 and 2.0.
132
133OpenBSD 6.5 January 21, 2019 OpenBSD 6.5