Is it possible to use Putty Key Generator via command line interface? I cannot find any documentation.
Any pointers?
Btw, I only want to generate a openssh formatted key pair on a windows machine.
Reading the source code it appears that there is a command line interface
in the main
if (argc > 0) {
if (!strcmp(argv[0], "-pgpfp")) {
pgp_fingerprints();
exit(1);
} else {
/*
* Assume the first argument to be a private key file, and
* attempt to load it.
*/
cmdline_keyfile = argv[0];
}
}
you have a choice
Which outputs a message:
void pgp_fingerprints(void)
{
fputs("These are the fingerprints of the PuTTY PGP Master Keys. They can\n"
"be used to establish a trust path from this executable to another\n"
"one. See the manual for more information.\n"
"(Note: these fingerprints have nothing to do with SSH!)\n"
"\n"
"PuTTY Master Key (RSA), 1024-bit:\n"
" " PGP_RSA_MASTER_KEY_FP "\n"
"PuTTY Master Key (DSA), 1024-bit:\n"
" " PGP_DSA_MASTER_KEY_FP "\n", stdout);
}
a keyfilename which is later used to
if (cmdline_keyfile) load_key_file(hwnd, state, filename_from_str(cmdline_keyfile), 0); return 1;`
My suggestion is follow the code and see what's what.
You're probably out of luck: puttygen (for good reason) doesn't really have a solid command line interface.
For what you need ssh-keygen
on Windows is probably what you'll need. It takes a bit of work but you might be able to extract it from the mSysGit install at http://code.google.com/p/msysgit/downloads/list and use that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With