Index: doc/Makefile.am =================================================================== --- doc/Makefile.am +++ doc/Makefile.am @@ -67,7 +67,7 @@ myman_pages = gpg2.1 gpgsm.1 gpg-agent.1 scdaemon.1 gpgv2.1 \ watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \ gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 \ - gpgsm-gencert.sh.1 applygnupgdefaults.8 gpg-zip.1 + gpgsm-gencert.sh.1 applygnupgdefaults.8 gpg-zip.1 gpgkey2ssh.1 man_MANS = $(myman_pages) noinst_MANS = gnupg.7 Index: doc/tools.texi =================================================================== --- doc/tools.texi +++ doc/tools.texi @@ -19,6 +19,7 @@ * gpgparsemail:: Parse a mail message into an annotated format * symcryptrun:: Call a simple symmetric encryption tool. * gpg-zip:: Encrypt or sign files into an archive. +* gpgkey2ssh:: Emit GPG public keys in OpenSSH format. @end menu @c @@ -1668,3 +1669,78 @@ @end ifset @include see-also-note.texi + +@c +@c GPGKEY2SSH +@c + +@manpage gpgkey2ssh.1 +@node gpgkey2ssh +@section +@ifset manverb +.B gpgkey2ssh +\- Emit GPG public keys in OpenSSH format +@end ifset + +@mansect synopsis +@ifset manverb +.B gpgkey2ssh +.I keyid +@end ifset + +@mansect description +@code{gpgkey2ssh} is a tool for emitting the public key material of a +known OpenPGP RSA or DSA key in a format readable by OpenSSH clients +and servers. + +It takes only a single argument, which is either a normal key ID (the +final 8 hex digits of the key fingerprint) or a ``long key ID'' (the +final 16 hex digit of the key fingerprint), referring to the exact +primary key or subkey whose public key material should be extracted. + +The key ID should use upper-case (A-F, not a-f) for all hex digits +greater than 9, and the key in question must be present in +@code{gpg}'s public keyring. + +The output of a successful run can be used verbatim as an entry in an +@code{authorized_keys} file for @code{sshd}, or can be prefixed with a +host name and appended to a @code{known_hosts} file for @code{ssh}. + +@mansect return value + +The program returns 0 if the key was successfully identified and +non-zero if there was an error (e.g. if the key ID was malformed, the +key was not present in the public keyring, or if the key so identified +is not an RSA or DSA key). + +@mansect environment +@subsection Environment + +@table @asis + +@item HOME +Used to locate the default home directory. + +@item GNUPGHOME +If set directory used instead of "~/.gnupg". + +@end table + +@mansect files +@subsection FILES + +@table @asis + +@item ~/.gnupg/pubring.gpg +The keyring searched for the requested key. + +@end table + +@mansect see also +@ifset isman +@command{gpg2}(1), +@command{sshd}(8), +@command{ssh}(1) +@end ifset +@include see-also-note.texi +