how can i generate a keypair without reading anwsers from stdin?
Jerome Baum
jerome at jeromebaum.com
Fri Aug 12 18:34:10 CEST 2011
> You can simply write the answers down like you would in an interactive
> session with gpg. Then feed this file with `gpg --gen-key ... < file`
>
> gpg just reads from standard input. There is no difference between a
> user pressing return and a newline character in a text file.
>
> If you want to generate multiple key from one file, try something like
> `while gpg --gen-key ...; do true; done < file`
I certainly think the batch solution is more appropriate. The batch
interfaces will be more consistent across different gpg versions,
while the numbers/letters you enter at the prompt can quickly change
if different algorithms are supported in a new version etc.
So stick with the batch and with-colons interfaces whenever you can.
They are also easier to script -- computer-readable and all that.
--
Jerome Baum
Hessenweg 222
48432 Rheine
GERMANY
tel +49-1578-8434336
email jerome at jeromebaum.com
web www.jeromebaum.com
--
Einigkeit und Recht und Modeerscheinung
--
PGP: A0E4 B2D4 94E6 20EE 85BA E45B 63E4 2BD8 C58C 753A
PGP: 2C23 EBFF DF1A 840D 2351 F5F5 F25B A03F 2152 36DA
--
http://five.sentenc.es
More information about the Gnupg-users
mailing list