On Mon, Jul 17, 2000 at 07:26:20AM -0700, [EMAIL PROTECTED] wrote:
> Just do this as the user:
> In SSH1:
> $ rm ~/.ssh/identity*
> $ ssh-keygen
> In SSH2:
> $ rm ~/.ssh2/id_dsa_1024_a*
> $ ssh-keygen2
:-)
Somehow, I don't think that was quite what he was asking. I think
what he was asking for was how to recover the public key, given the private
key. I was thinking that OpenSSH had an option in ssh-keygen for doing
something like this, but I can't find it now. It has some translation
options for key formats, but that's about it.
The only reason I can see for doing this is where you have
distributed your public key and then accidently deleted or corrupted
your public key. For that, I would say just extract back the public
key from one of the systems that have it in an authorize_keys file on
in a known_hosts file.
Mathmatically, it should be real easy. Just read the private key
and feed it back into the algorithm to regenerate the public key. For
RSA keys, the two primes and the private modulus were saved in the
private key, so you have everything you need. I'm not totally sure there
is a sufficient reason for needing that functionality, though.
> -Anne
> On Fri, Jul 14, 2000 at 04:49:28PM -0400, Jeremy Hansen wrote:
> >
> >
> > I need to regenerate my public key from an identity file, how do I do
> > this? I assume it somehow possible as long as I have the secret key and
> > passphrase.
> >
> > Thanks
> > -jeremy
> >
> -------------------------------------------------------------------------
> Anne Carasik | Economists state their GNP growth
> Principal Consultant | projections to the nearest tenth of
> SSH Communications Security, Inc. | a percentage point to prove they have
> Email: [EMAIL PROTECTED] | a sense of humor. -Edgar R. Fiedler
> -------------------------------------------------------------------------
> Unless stated otherwise above, the opinions expressed herein are my own,
> not of my employer.
--
Michael H. Warfield | (770) 985-6132 | [EMAIL PROTECTED]
(The Mad Wizard) | (770) 331-2437 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!