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