man-pages/man1/gpg-preset-passphrase.1.html
2021-03-31 01:06:50 +01:00

158 lines
3.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GPG-PRESET-PASSPHRASE</TITLE>
</HEAD><BODY>
<H1>GPG-PRESET-PASSPHRASE</H1>
Section: GNU Privacy Guard 2.2 (1)<BR>Updated: 2019-11-23<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>gpg-preset-passphrase</B>
- Put a passphrase into gpg-agent's cache
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>gpg-preset-passphrase</B>
[<I>options</I>]
[<I>command</I>]
<I>cache-id</I>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The <B>gpg-preset-passphrase</B> is a utility to seed the internal
cache of a running <B>gpg-agent</B> with passphrases. It is mainly
useful for unattended machines, where the usual <B>pinentry</B> tool
may not be used and the passphrases for the to be used keys are given at
machine startup.
<P>
This program works with GnuPG 2 and later. GnuPG 1.x is not supported.
<P>
Passphrases set with this utility don't expire unless the
<B>--forget</B> option is used to explicitly clear them from the
cache --- or <B>gpg-agent</B> is either restarted or reloaded (by
sending a SIGHUP to it). Note that the maximum cache time as set with
<B>--max-cache-ttl</B> is still honored. It is necessary to allow
this passphrase presetting by starting <B>gpg-agent</B> with the
<B>--allow-preset-passphrase</B>.
<P>
<P>
<P>
<P>
<B>gpg-preset-passphrase</B> is invoked this way:
<P>
<DL COMPACT><DT id="1"><DD>
<PRE>
gpg-preset-passphrase [options] [command] <I>cacheid</I>
</PRE>
</DL>
<P>
<I>cacheid</I> is either a 40 character keygrip of hexadecimal
characters identifying the key for which the passphrase should be set
or cleared. The keygrip is listed along with the key when running the
command: <B>gpgsm --with-keygrip --list-secret-keys</B>.
Alternatively an arbitrary string may be used to identify a
passphrase; it is suggested that such a string is prefixed with the
name of the application (e.g <B>foo:12346</B>). Scripts should always
use the option <B>--with-colons</B>, which provides the keygrip in a
&quot;grp&quot; line (cf. '<I>doc/DETAILS</I>')/
<P>
<P>
One of the following command options must be given:
<P>
<DL COMPACT>
<DT id="2"><B>--preset</B>
<DD>
Preset a passphrase. This is what you usually will
use. <B>gpg-preset-passphrase</B> will then read the passphrase from
<B>stdin</B>.
<P>
<DT id="3"><B>--forget</B>
<DD>
Flush the passphrase for the given cache ID from the cache.
<P>
</DL>
<P>
<P>
<P>
The following additional options may be used:
<P>
<DL COMPACT>
<DT id="4"><B>-v</B>
<DD>
<B>--verbose</B>
Output additional information while running.
<P>
<DT id="5"><B>-P </B><I>string</I>
<DD>
<B>--passphrase </B><I>string</I>
Instead of reading the passphrase from <B>stdin</B>, use the supplied
<I>string</I> as passphrase. Note that this makes the passphrase visible
for other users.
</DL>
<P>
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+gpg">gpg</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+gpgsm">gpgsm</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+gpg-agent">gpg-agent</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+scdaemon">scdaemon</A></B>(1)
<P>
The full documentation for this tool is maintained as a Texinfo manual.
If GnuPG and the info program are properly installed at your site, the
command
<P>
<DL COMPACT><DT id="6"><DD>
<PRE>
info gnupg
</PRE>
</DL>
<P>
should give you access to the complete manual including a menu structure
and an index.
<P>
<P>
<P>
<P>
<P>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAE">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:15 GMT, March 31, 2021
</BODY>
</HTML>