summaryrefslogtreecommitdiff
path: root/ssh-add.0
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-add.0')
-rw-r--r--ssh-add.0152
1 files changed, 152 insertions, 0 deletions
diff --git a/ssh-add.0 b/ssh-add.0
new file mode 100644
index 000000000..d73af0f43
--- /dev/null
+++ b/ssh-add.0
@@ -0,0 +1,152 @@
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. If
47 the argument list consists of M-bM-^@M-^\-M-bM-^@M-^] then ssh-add will read public
48 keys to be removed from standard input.
49
50 -E fingerprint_hash
51 Specifies the hash algorithm used when displaying key
52 fingerprints. Valid options are: M-bM-^@M-^\md5M-bM-^@M-^] and M-bM-^@M-^\sha256M-bM-^@M-^]. The
53 default is M-bM-^@M-^\sha256M-bM-^@M-^].
54
55 -e pkcs11
56 Remove keys provided by the PKCS#11 shared library pkcs11.
57
58 -K Load resident keys from a FIDO authenticator.
59
60 -k When loading keys into or deleting keys from the agent, process
61 plain private keys only and skip certificates.
62
63 -L Lists public key parameters of all identities currently
64 represented by the agent.
65
66 -l Lists fingerprints of all identities currently represented by the
67 agent.
68
69 -q Be quiet after a successful operation.
70
71 -S provider
72 Specifies a path to a library that will be used when adding FIDO
73 authenticator-hosted keys, overriding the default of using the
74 internal USB HID support.
75
76 -s pkcs11
77 Add keys provided by the PKCS#11 shared library pkcs11.
78
79 -T pubkey ...
80 Tests whether the private keys that correspond to the specified
81 pubkey files are usable by performing sign and verify operations
82 on each.
83
84 -t life
85 Set a maximum lifetime when adding identities to an agent. The
86 lifetime may be specified in seconds or in a time format
87 specified in sshd_config(5).
88
89 -v Verbose mode. Causes ssh-add to print debugging messages about
90 its progress. This is helpful in debugging problems. Multiple
91 -v options increase the verbosity. The maximum is 3.
92
93 -X Unlock the agent.
94
95 -x Lock the agent with a password.
96
97ENVIRONMENT
98 DISPLAY, SSH_ASKPASS and SSH_ASKPASS_REQUIRE
99 If ssh-add needs a passphrase, it will read the passphrase from
100 the current terminal if it was run from a terminal. If ssh-add
101 does not have a terminal associated with it but DISPLAY and
102 SSH_ASKPASS are set, it will execute the program specified by
103 SSH_ASKPASS (by default M-bM-^@M-^\ssh-askpassM-bM-^@M-^]) and open an X11 window to
104 read the passphrase. This is particularly useful when calling
105 ssh-add from a .xsession or related script.
106
107 SSH_ASKPASS_REQUIRE allows further control over the use of an
108 askpass program. If this variable is set to M-bM-^@M-^\neverM-bM-^@M-^] then ssh-add
109 will never attempt to use one. If it is set to M-bM-^@M-^\preferM-bM-^@M-^], then
110 ssh-add will prefer to use the askpass program instead of the TTY
111 when requesting passwords. Finally, if the variable is set to
112 M-bM-^@M-^\forceM-bM-^@M-^], then the askpass program will be used for all passphrase
113 input regardless of whether DISPLAY is set.
114
115 SSH_AUTH_SOCK
116 Identifies the path of a UNIX-domain socket used to communicate
117 with the agent.
118
119 SSH_SK_PROVIDER
120 Specifies a path to a library that will be used when loading any
121 FIDO authenticator-hosted keys, overriding the default of using
122 the built-in USB HID support.
123
124FILES
125 ~/.ssh/id_dsa
126 ~/.ssh/id_ecdsa
127 ~/.ssh/id_ecdsa_sk
128 ~/.ssh/id_ed25519
129 ~/.ssh/id_ed25519_sk
130 ~/.ssh/id_rsa
131 Contains the DSA, ECDSA, authenticator-hosted ECDSA, Ed25519,
132 authenticator-hosted Ed25519 or RSA authentication identity of
133 the user.
134
135 Identity files should not be readable by anyone but the user. Note that
136 ssh-add ignores identity files if they are accessible by others.
137
138EXIT STATUS
139 Exit status is 0 on success, 1 if the specified command fails, and 2 if
140 ssh-add is unable to contact the authentication agent.
141
142SEE ALSO
143 ssh(1), ssh-agent(1), ssh-askpass(1), ssh-keygen(1), sshd(8)
144
145AUTHORS
146 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
147 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
148 de Raadt and Dug Song removed many bugs, re-added newer features and
149 created OpenSSH. Markus Friedl contributed the support for SSH protocol
150 versions 1.5 and 2.0.
151
152OpenBSD 6.8 July 14, 2020 OpenBSD 6.8