1GPG-AGENT(1) GNU Privacy Guard 2.2 GPG-AGENT(1)
2
3
4
6 gpg-agent - Secret key management for GnuPG
7
9 gpg-agent [--homedir dir] [--options file] [options]
10 gpg-agent [--homedir dir] [--options file] [options] --server
11 gpg-agent [--homedir dir] [--options file] [options] --daemon [com‐
12 mand_line]
13
14
16 gpg-agent is a daemon to manage secret (private) keys independently
17 from any protocol. It is used as a backend for gpg and gpgsm as well
18 as for a couple of other utilities.
19
20 The agent is automatically started on demand by gpg, gpgsm, gpgconf, or
21 gpg-connect-agent. Thus there is no reason to start it manually. In
22 case you want to use the included Secure Shell Agent you may start the
23 agent using:
24
25
26 gpg-connect-agent /bye
27
28
29 If you want to manually terminate the currently-running agent, you can
30 safely do so with:
31
32 gpgconf --kill gpg-agent
33
34
35 You should always add the following lines to your .bashrc or whatever
36 initialization file is used for all shell invocations:
37
38 GPG_TTY=$(tty)
39 export GPG_TTY
40
41
42 It is important that this environment variable always reflects the out‐
43 put of the tty command. For W32 systems this option is not required.
44
45 Please make sure that a proper pinentry program has been installed un‐
46 der the default filename (which is system dependent) or use the option
47 pinentry-program to specify the full name of that program. It is often
48 useful to install a symbolic link from the actual used pinentry (e.g.
49 ‘/usr/bin/pinentry-gtk’) to the expected one (e.g. ‘/usr/bin/pinen‐
50 try’).
51
52
53
54
56 Commands are not distinguished from options except for the fact that
57 only one command is allowed.
58
59
60 --version
61 Print the program version and licensing information. Note that
62 you cannot abbreviate this command.
63
64
65 --help
66 -h Print a usage message summarizing the most useful command-line
67 options. Note that you cannot abbreviate this command.
68
69
70 --dump-options
71 Print a list of all available options and commands. Note that
72 you cannot abbreviate this command.
73
74
75 --server
76 Run in server mode and wait for commands on the stdin. The de‐
77 fault mode is to create a socket and listen for commands there.
78
79
80 --daemon [command line]
81 Start the gpg-agent as a daemon; that is, detach it from the
82 console and run it in the background.
83
84 As an alternative you may create a new process as a child of
85 gpg-agent: gpg-agent --daemon /bin/sh. This way you get a new
86 shell with the environment setup properly; after you exit from
87 this shell, gpg-agent terminates within a few seconds.
88
89
90 --supervised
91 Run in the foreground, sending logs by default to stderr, and
92 listening on provided file descriptors, which must already be
93 bound to listening sockets. This command is useful when running
94 under systemd or other similar process supervision schemes.
95 This option is not supported on Windows.
96
97 In --supervised mode, different file descriptors can be provided
98 for use as different socket types (e.g. ssh, extra) as long as
99 they are identified in the environment variable LISTEN_FDNAMES
100 (see sd_listen_fds(3) on some Linux distributions for more in‐
101 formation on this convention).
102
104 Options may either be used on the command line or, after stripping off
105 the two leading dashes, in the configuration file.
106
107
108
109
110 --options file
111 Reads configuration from file instead of from the default per-
112 user configuration file. The default configuration file is
113 named ‘gpg-agent.conf’ and expected in the ‘.gnupg’ directory
114 directly below the home directory of the user. This option is
115 ignored if used in an options file.
116
117
118
119 --homedir dir
120 Set the name of the home directory to dir. If this option is not
121 used, the home directory defaults to ‘~/.gnupg’. It is only
122 recognized when given on the command line. It also overrides
123 any home directory stated through the environment variable
124 ‘GNUPGHOME’ or (on Windows systems) by means of the Registry en‐
125 try HKCU\Software\GNU\GnuPG:HomeDir.
126
127 On Windows systems it is possible to install GnuPG as a portable
128 application. In this case only this command line option is con‐
129 sidered, all other ways to set a home directory are ignored.
130
131 To install GnuPG as a portable application under Windows, create
132 an empty file named ‘gpgconf.ctl’ in the same directory as the
133 tool ‘gpgconf.exe’. The root of the installation is then that
134 directory; or, if ‘gpgconf.exe’ has been installed directly be‐
135 low a directory named ‘bin’, its parent directory. You also
136 need to make sure that the following directories exist and are
137 writable: ‘ROOT/home’ for the GnuPG home and
138 ‘ROOT/var/cache/gnupg’ for internal cache files.
139
140
141
142 -v
143 --verbose
144 Outputs additional information while running. You can increase
145 the verbosity by giving several verbose commands to gpg-agent,
146 such as ‘-vv’.
147
148
149 -q
150 --quiet
151 Try to be as quiet as possible.
152
153
154 --batch
155 Don't invoke a pinentry or do any other thing requiring human
156 interaction.
157
158
159 --faked-system-time epoch
160 This option is only useful for testing; it sets the system time
161 back or forth to epoch which is the number of seconds elapsed
162 since the year 1970.
163
164
165 --debug-level level
166 Select the debug level for investigating problems. level may be
167 a numeric value or a keyword:
168
169
170 none No debugging at all. A value of less than 1 may be used
171 instead of the keyword.
172
173 basic Some basic debug messages. A value between 1 and 2 may
174 be used instead of the keyword.
175
176 advanced
177 More verbose debug messages. A value between 3 and 5 may
178 be used instead of the keyword.
179
180 expert Even more detailed messages. A value between 6 and 8 may
181 be used instead of the keyword.
182
183 guru All of the debug messages you can get. A value greater
184 than 8 may be used instead of the keyword. The creation
185 of hash tracing files is only enabled if the keyword is
186 used.
187
188 How these messages are mapped to the actual debugging flags is not
189 specified and may change with newer releases of this program. They are
190 however carefully selected to best aid in debugging.
191
192
193 --debug flags
194 Set debug flags. All flags are or-ed and flags may be given in
195 C syntax (e.g. 0x0042) or as a comma separated list of flag
196 names. To get a list of all supported flags the single word
197 "help" can be used. This option is only useful for debugging and
198 the behavior may change at any time without notice.
199
200
201 --debug-all
202 Same as --debug=0xffffffff
203
204
205 --debug-wait n
206 When running in server mode, wait n seconds before entering the
207 actual processing loop and print the pid. This gives time to
208 attach a debugger.
209
210
211 --debug-quick-random
212 This option inhibits the use of the very secure random quality
213 level (Libgcrypt’s GCRY_VERY_STRONG_RANDOM) and degrades all re‐
214 quest down to standard random quality. It is only used for
215 testing and should not be used for any production quality keys.
216 This option is only effective when given on the command line.
217
218 On GNU/Linux, another way to quickly generate insecure keys is
219 to use rngd to fill the kernel's entropy pool with lower quality
220 random data. rngd is typically provided by the rng-tools pack‐
221 age. It can be run as follows: ‘sudo rngd -f -r /dev/urandom’.
222
223
224 --debug-pinentry
225 This option enables extra debug information pertaining to the
226 Pinentry. As of now it is only useful when used along with
227 --debug 1024.
228
229
230 --no-detach
231 Don't detach the process from the console. This is mainly use‐
232 ful for debugging.
233
234
235 -s
236 --sh
237 -c
238 --csh Format the info output in daemon mode for use with the standard
239 Bourne shell or the C-shell respectively. The default is to
240 guess it based on the environment variable SHELL which is cor‐
241 rect in almost all cases.
242
243
244
245 --grab
246 --no-grab
247 Tell the pinentry to grab the keyboard and mouse. This option
248 should be used on X-Servers to avoid X-sniffing attacks. Any use
249 of the option --grab overrides an used option --no-grab. The
250 default is --no-grab.
251
252
253
254 --log-file file
255 Append all logging output to file. This is very helpful in see‐
256 ing what the agent actually does. Use ‘socket://’ to log to
257 socket. If neither a log file nor a log file descriptor has
258 been set on a Windows platform, the Registry entry HKCU\Soft‐
259 ware\GNU\GnuPG:DefaultLogFile, if set, is used to specify the
260 logging output.
261
262
263
264
265 --no-allow-mark-trusted
266 Do not allow clients to mark keys as trusted, i.e. put them into
267 the ‘trustlist.txt’ file. This makes it harder for users to in‐
268 advertently accept Root-CA keys.
269
270
271
272 --allow-preset-passphrase
273 This option allows the use of gpg-preset-passphrase to seed the
274 internal cache of gpg-agent with passphrases.
275
276
277
278 --no-allow-loopback-pinentry
279
280 --allow-loopback-pinentry
281 Disallow or allow clients to use the loopback pinentry features;
282 see the option pinentry-mode for details. Allow is the default.
283
284 The --force option of the Assuan command DELETE_KEY is also con‐
285 trolled by this option: The option is ignored if a loopback
286 pinentry is disallowed.
287
288
289 --no-allow-external-cache
290 Tell Pinentry not to enable features which use an external cache
291 for passphrases.
292
293 Some desktop environments prefer to unlock all credentials with
294 one master password and may have installed a Pinentry which em‐
295 ploys an additional external cache to implement such a policy.
296 By using this option the Pinentry is advised not to make use of
297 such a cache and instead always ask the user for the requested
298 passphrase.
299
300
301 --allow-emacs-pinentry
302 Tell Pinentry to allow features to divert the passphrase entry
303 to a running Emacs instance. How this is exactly handled de‐
304 pends on the version of the used Pinentry.
305
306
307 --ignore-cache-for-signing
308 This option will let gpg-agent bypass the passphrase cache for
309 all signing operation. Note that there is also a per-session
310 option to control this behavior but this command line option
311 takes precedence.
312
313
314 --default-cache-ttl n
315 Set the time a cache entry is valid to n seconds. The default
316 is 600 seconds. Each time a cache entry is accessed, the en‐
317 try's timer is reset. To set an entry's maximum lifetime, use
318 max-cache-ttl. Note that a cached passphrase may not be evicted
319 immediately from memory if no client requests a cache operation.
320 This is due to an internal housekeeping function which is only
321 run every few seconds.
322
323
324 --default-cache-ttl-ssh n
325 Set the time a cache entry used for SSH keys is valid to n sec‐
326 onds. The default is 1800 seconds. Each time a cache entry is
327 accessed, the entry's timer is reset. To set an entry's maximum
328 lifetime, use max-cache-ttl-ssh.
329
330
331 --max-cache-ttl n
332 Set the maximum time a cache entry is valid to n seconds. After
333 this time a cache entry will be expired even if it has been ac‐
334 cessed recently or has been set using gpg-preset-passphrase.
335 The default is 2 hours (7200 seconds).
336
337
338 --max-cache-ttl-ssh n
339 Set the maximum time a cache entry used for SSH keys is valid to
340 n seconds. After this time a cache entry will be expired even
341 if it has been accessed recently or has been set using gpg-pre‐
342 set-passphrase. The default is 2 hours (7200 seconds).
343
344
345 --enforce-passphrase-constraints
346 Enforce the passphrase constraints by not allowing the user to
347 bypass them using the ``Take it anyway'' button.
348
349
350 --min-passphrase-len n
351 Set the minimal length of a passphrase. When entering a new
352 passphrase shorter than this value a warning will be displayed.
353 Defaults to 8.
354
355
356 --min-passphrase-nonalpha n
357 Set the minimal number of digits or special characters required
358 in a passphrase. When entering a new passphrase with less than
359 this number of digits or special characters a warning will be
360 displayed. Defaults to 1.
361
362
363 --check-passphrase-pattern file
364 --check-sym-passphrase-pattern file
365 Check the passphrase against the pattern given in file. When
366 entering a new passphrase matching one of these pattern a warn‐
367 ing will be displayed. If file does not contain any slashes and
368 does not start with "~/" it is searched in the system configura‐
369 tion directory (‘/etc/gnupg’). The default is not to use any
370 pattern file. The second version of this option is only used
371 when creating a new symmetric key to allow the use of different
372 patterns for such passphrases.
373
374 Security note: It is known that checking a passphrase against a
375 list of pattern or even against a complete dictionary is not
376 very effective to enforce good passphrases. Users will soon
377 figure up ways to bypass such a policy. A better policy is to
378 educate users on good security behavior and optionally to run a
379 passphrase cracker regularly on all users passphrases to catch
380 the very simple ones.
381
382
383 --max-passphrase-days n
384 Ask the user to change the passphrase if n days have passed
385 since the last change. With --enforce-passphrase-constraints
386 set the user may not bypass this check.
387
388
389 --enable-passphrase-history
390 This option does nothing yet.
391
392
393 --pinentry-invisible-char char
394 This option asks the Pinentry to use char for displaying hidden
395 characters. char must be one character UTF-8 string. A Pinen‐
396 try may or may not honor this request.
397
398
399 --pinentry-timeout n
400 This option asks the Pinentry to timeout after n seconds with no
401 user input. The default value of 0 does not ask the pinentry to
402 timeout, however a Pinentry may use its own default timeout
403 value in this case. A Pinentry may or may not honor this re‐
404 quest.
405
406
407 --pinentry-formatted-passphrase
408 This option asks the Pinentry to enable passphrase formatting
409 when asking the user for a new passphrase and masking of the
410 passphrase is turned off.
411
412 If passphrase formatting is enabled, then all non-breaking space
413 characters are stripped from the entered passphrase. Passphrase
414 formatting is mostly useful in combination with passphrases gen‐
415 erated with the GENPIN feature of some Pinentries. Note that
416 such a generated passphrase, if not modified by the user, skips
417 all passphrase constraints checking because such constraints
418 would actually weaken the generated passphrase.
419
420
421 --pinentry-program filename
422 Use program filename as the PIN entry. The default is installa‐
423 tion dependent. With the default configuration the name of the
424 default pinentry is ‘pinentry’; if that file does not exist but
425 a ‘pinentry-basic’ exist the latter is used.
426
427 On a Windows platform the default is to use the first existing
428 program from this list: ‘bin\pinentry.exe’,
429 ‘..\Gpg4win\bin\pinentry.exe’, ‘..\Gpg4win\pinentry.exe’,
430 ‘..\GNU\GnuPG\pinentry.exe’, ‘..\GNU\bin\pinentry.exe’,
431 ‘bin\pinentry-basic.exe’ where the file names are relative to
432 the GnuPG installation directory.
433
434
435
436 --pinentry-touch-file filename
437 By default the filename of the socket gpg-agent is listening for
438 requests is passed to Pinentry, so that it can touch that file
439 before exiting (it does this only in curses mode). This option
440 changes the file passed to Pinentry to filename. The special
441 name /dev/null may be used to completely disable this feature.
442 Note that Pinentry will not create that file, it will only
443 change the modification and access time.
444
445
446
447 --scdaemon-program filename
448 Use program filename as the Smartcard daemon. The default is
449 installation dependent and can be shown with the gpgconf com‐
450 mand.
451
452
453 --disable-scdaemon
454 Do not make use of the scdaemon tool. This option has the ef‐
455 fect of disabling the ability to do smartcard operations. Note,
456 that enabling this option at runtime does not kill an already
457 forked scdaemon.
458
459
460 --disable-check-own-socket
461 gpg-agent employs a periodic self-test to detect a stolen
462 socket. This usually means a second instance of gpg-agent has
463 taken over the socket and gpg-agent will then terminate itself.
464 This option may be used to disable this self-test for debugging
465 purposes.
466
467
468 --use-standard-socket
469 --no-use-standard-socket
470 --use-standard-socket-p
471 Since GnuPG 2.1 the standard socket is always used. These op‐
472 tions have no more effect. The command gpg-agent --use-stan‐
473 dard-socket-p will thus always return success.
474
475
476 --display string
477 --ttyname string
478 --ttytype string
479 --lc-ctype string
480 --lc-messages string
481 --xauthority string
482 These options are used with the server mode to pass localization
483 information.
484
485
486 --keep-tty
487 --keep-display
488 Ignore requests to change the current tty or X window system's
489 DISPLAY variable respectively. This is useful to lock the
490 pinentry to pop up at the tty or display you started the agent.
491
492
493 --listen-backlog n
494 Set the size of the queue for pending connections. The default
495 is 64.
496
497
498
499 --extra-socket name
500 The extra socket is created by default, you may use this option
501 to change the name of the socket. To disable the creation of
502 the socket use ``none'' or ``/dev/null'' for name.
503
504 Also listen on native gpg-agent connections on the given socket.
505 The intended use for this extra socket is to setup a Unix domain
506 socket forwarding from a remote machine to this socket on the
507 local machine. A gpg running on the remote machine may then
508 connect to the local gpg-agent and use its private keys. This
509 enables decrypting or signing data on a remote machine without
510 exposing the private keys to the remote machine.
511
512
513 --enable-extended-key-format
514 --disable-extended-key-format
515 Since version 2.3 keys are created in the extended private key
516 format. Changing the passphrase of a key will also convert the
517 key to that new format. This new key format is supported since
518 GnuPG version 2.1.12 and thus there should be no need to disable
519 it. The disable option allows to revert to the old behavior for
520 new keys; be aware that keys are never migrated back to the old
521 format. However if the enable option has been used the disable
522 option won't have an effect. The advantage of the extended pri‐
523 vate key format is that it is text based and can carry addi‐
524 tional meta data.
525
526
527
528 --enable-ssh-support
529 --enable-putty-support
530
531 The OpenSSH Agent protocol is always enabled, but gpg-agent will
532 only set the SSH_AUTH_SOCK variable if this flag is given.
533
534 In this mode of operation, the agent does not only implement the
535 gpg-agent protocol, but also the agent protocol used by OpenSSH
536 (through a separate socket). Consequently, it should be possi‐
537 ble to use the gpg-agent as a drop-in replacement for the well
538 known ssh-agent.
539
540 SSH Keys, which are to be used through the agent, need to be
541 added to the gpg-agent initially through the ssh-add utility.
542 When a key is added, ssh-add will ask for the password of the
543 provided key file and send the unprotected key material to the
544 agent; this causes the gpg-agent to ask for a passphrase, which
545 is to be used for encrypting the newly received key and storing
546 it in a gpg-agent specific directory.
547
548 Once a key has been added to the gpg-agent this way, the gpg-
549 agent will be ready to use the key.
550
551 Note: in case the gpg-agent receives a signature request, the
552 user might need to be prompted for a passphrase, which is neces‐
553 sary for decrypting the stored key. Since the ssh-agent proto‐
554 col does not contain a mechanism for telling the agent on which
555 display/terminal it is running, gpg-agent's ssh-support will use
556 the TTY or X display where gpg-agent has been started. To
557 switch this display to the current one, the following command
558 may be used:
559
560 gpg-connect-agent updatestartuptty /bye
561
562 Although all GnuPG components try to start the gpg-agent as needed,
563 this is not possible for the ssh support because ssh does not know
564 about it. Thus if no GnuPG tool which accesses the agent has been run,
565 there is no guarantee that ssh is able to use gpg-agent for authentica‐
566 tion. To fix this you may start gpg-agent if needed using this simple
567 command:
568
569 gpg-connect-agent /bye
570
571 Adding the --verbose shows the progress of starting the agent.
572
573 The --enable-putty-support is only available under Windows and allows
574 the use of gpg-agent with the ssh implementation putty. This is simi‐
575 lar to the regular ssh-agent support but makes use of Windows message
576 queue as required by putty.
577
578
579
580 --ssh-fingerprint-digest
581
582 Select the digest algorithm used to compute ssh fingerprints
583 that are communicated to the user, e.g. in pinentry dialogs.
584 OpenSSH has transitioned from using MD5 to the more secure
585 SHA256.
586
587
588
589 --auto-expand-secmem n
590 Allow Libgcrypt to expand its secure memory area as required.
591 The optional value n is a non-negative integer with a suggested
592 size in bytes of each additionally allocated secure memory area.
593 The value is rounded up to the next 32 KiB; usual C style pre‐
594 fixes are allowed. For an heavy loaded gpg-agent with many con‐
595 current connection this option avoids sign or decrypt errors due
596 to out of secure memory error returns.
597
598
599 --s2k-calibration milliseconds
600 Change the default calibration time to milliseconds. The given
601 value is capped at 60 seconds; a value of 0 resets to the com‐
602 piled-in default. This option is re-read on a SIGHUP (or gpg‐
603 conf --reload gpg-agent) and the S2K count is then re-cali‐
604 brated.
605
606
607 --s2k-count n
608 Specify the iteration count used to protect the passphrase.
609 This option can be used to override the auto-calibration done by
610 default. The auto-calibration computes a count which requires
611 by default 100ms to mangle a given passphrase. See also --s2k-
612 calibration.
613
614 To view the actually used iteration count and the milliseconds
615 required for an S2K operation use:
616
617 gpg-connect-agent 'GETINFO s2k_count' /bye
618 gpg-connect-agent 'GETINFO s2k_time' /bye
619
620 To view the auto-calibrated count use:
621
622 gpg-connect-agent 'GETINFO s2k_count_cal' /bye
623
624
625
627 It is important to set the environment variable GPG_TTY in your login
628 shell, for example in the ‘~/.bashrc’ init script:
629
630 export GPG_TTY=$(tty)
631
632 If you enabled the Ssh Agent Support, you also need to tell ssh about
633 it by adding this to your init script:
634
635 unset SSH_AGENT_PID
636 if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
637 export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
638 fi
639
640
641
642
644 There are a few configuration files needed for the operation of the
645 agent. By default they may all be found in the current home directory
646 (see: [option --homedir]).
647
648
649
650 gpg-agent.conf
651 This is the standard configuration file read by gpg-agent on
652 startup. It may contain any valid long option; the leading
653 two dashes may not be entered and the option may not be abbre‐
654 viated.
655 This file is also read after a SIGHUP however only a few
656 options will actually have an effect. This default name may
657 be
658 changed on the command line (see: [option --options]).
659 You should backup this file.
660
661
662 trustlist.txt
663 This is the list of trusted keys. You should backup this
664 file.
665
666 Comment lines, indicated by a leading hash mark, as well as
667 empty
668 lines are ignored. To mark a key as trusted you need to enter
669 its
670 fingerprint followed by a space and a capital letter S.
671 Colons
672 may optionally be used to separate the bytes of a fingerprint;
673 this
674 enables cutting and pasting the fingerprint from a key listing
675 output. If
676 the line is prefixed with a ! the key is explicitly marked as
677 not trusted.
678
679 Here is an example where two keys are marked as ultimately
680 trusted
681 and one as not trusted:
682
683 .RS 2
684 # CN=Wurzel ZS 3,O=Intevation GmbH,C=DE
685 A6935DD34EF3087973C706FC311AA2CCF733765B S
686
687 # CN=PCA-1-Verwaltung-02/O=PKI-1-Verwaltung/C=DE
688 DC:BD:69:25:48:BD:BB:7E:31:6E:BB:80:D3:00:80:35:D4:F8:A6:CD S
689
690 # CN=Root-CA/O=Schlapphuete/L=Pullach/C=DE
691 !14:56:98:D3:FE:9C:CA:5A:31:6E:BC:81:D3:11:4E:00:90:A3:44:C2 S
692 .fi
693
694 Before entering a key into this file, you need to ensure its
695 authenticity. How to do this depends on your organisation; your
696 administrator might have already entered those keys which are deemed
697 trustworthy enough into this file. Places where to look for the
698 fingerprint of a root certificate are letters received from the CA or
699 the website of the CA (after making 100% sure that this is indeed the
700 website of that CA). You may want to consider disallowing interactive
701 updates of this file by using the [option --no-allow-mark-trusted].
702 It might even be advisable to change the permissions to read-only so
703 that this file can't be changed inadvertently.
704
705 As a special feature a line include-default will include a global
706 list of trusted certificates (e.g. ‘/etc/gnupg/trustlist.txt’).
707 This global list is also used if the local list is not available.
708
709 It is possible to add further flags after the S for use by the
710 caller:
711
712
713
714 relax Relax checking of some root certificate requirements. As of now this
715 flag allows the use of root certificates with a missing basicConstraints
716 attribute (despite that it is a MUST for CA certificates) and disables
717 CRL checking for the root certificate.
718
719
720 cm If validation of a certificate finally issued by a CA with this flag set
721 fails, try again using the chain validation model.
722
723
724
725
726 sshcontrol
727 This file is used when support for the secure shell agent protocol has
728 been enabled (see: [option --enable-ssh-support]). Only keys present in
729 this file are used in the SSH protocol. You should backup this file.
730
731 The ssh-add tool may be used to add new entries to this file;
732 you may also add them manually. Comment lines, indicated by a leading
733 hash mark, as well as empty lines are ignored. An entry starts with
734 optional whitespace, followed by the keygrip of the key given as 40 hex
735 digits, optionally followed by the caching TTL in seconds and another
736 optional field for arbitrary flags. A non-zero TTL overrides the global
737 default as set by --default-cache-ttl-ssh.
738
739 The only flag support is confirm. If this flag is found for a
740 key, each use of the key will pop up a pinentry to confirm the use of
741 that key. The flag is automatically set if a new key was loaded into
742 gpg-agent using the option -c of the ssh-add
743 command.
744
745 The keygrip may be prefixed with a ! to disable an entry.
746
747 The following example lists exactly one key. Note that keys available
748 through a OpenPGP smartcard in the active smartcard reader are
749 implicitly added to this list; i.e. there is no need to list them.
750
751 # Key added on: 2011-07-20 20:38:46
752 # Fingerprint: 5e:8d:c4:ad:e7:af:6e:27:8a:d6:13:e4:79:ad:0b:81
753 34B62F25E277CF13D3C6BCEBFD3F85D08F0A864B 0 confirm
754
755
756 private-keys-v1.d/
757
758 This is the directory where gpg-agent stores the private keys.
759 Each
760 key is stored in a file with the name made up of the keygrip
761 and the
762 suffix ‘key’. You should backup all files in this directory
763 and take great care to keep this backup closed away.
764
765
766
767 Note that on larger installations, it is useful to put predefined files
768 into the directory ‘/etc/skel/.gnupg’ so that newly created users start
769 up with a working configuration. For existing users the a small helper
770 script is provided to create these files (see: [addgnupghome]).
771
772
773
774
775
777 A running gpg-agent may be controlled by signals, i.e. using the kill
778 command to send a signal to the process.
779
780 Here is a list of supported signals:
781
782
783
784 SIGHUP This signal flushes all cached passphrases and if the program
785 has been started with a configuration file, the configuration
786 file is read again. Only certain options are honored: quiet,
787 verbose, debug, debug-all, debug-level, debug-pinentry, no-grab,
788 pinentry-program, pinentry-invisible-char, default-cache-ttl,
789 max-cache-ttl, ignore-cache-for-signing, s2k-count, no-allow-ex‐
790 ternal-cache, allow-emacs-pinentry, no-allow-mark-trusted, dis‐
791 able-scdaemon, and disable-check-own-socket. scdaemon-program
792 is also supported but due to the current implementation, which
793 calls the scdaemon only once, it is not of much use unless you
794 manually kill the scdaemon.
795
796
797
798 SIGTERM
799 Shuts down the process but waits until all current requests are
800 fulfilled. If the process has received 3 of these signals and
801 requests are still pending, a shutdown is forced.
802
803
804 SIGINT Shuts down the process immediately.
805
806
807 SIGUSR1
808 Dump internal information to the log file.
809
810
811 SIGUSR2
812 This signal is used for internal purposes.
813
814
816 gpg(1), gpgsm(1), gpgconf(1), gpg-connect-agent(1), scdaemon(1)
817
818 The full documentation for this tool is maintained as a Texinfo manual.
819 If GnuPG and the info program are properly installed at your site, the
820 command
821
822 info gnupg
823
824 should give you access to the complete manual including a menu struc‐
825 ture and an index.
826
827
828
829GnuPG 2.3.3 2021-10-06 GPG-AGENT(1)