[ec2] Restore keypair

Eric Hammond ehammond at thinksome.com
Mon Jul 6 19:00:13 BST 2009


Morgan:

When you say "delete a keypair" do you mean...

1) You deleted the local copy of the private ssh key?

Amazon does not store the private half of the ssh key, so unless you
have a copy stored somewhere, you will need to create a new keypair in
EC2 (saving the private key), start new instances with that new keypair,
and connect using the new private key.

If you have any running instances with the old keypair, you will not be
able to create new connections to them, but if you happen to have ssh
connections still running, you could add a different ssh key to
authorized_keys so that you can continue connecting.

2) You deleted the record of the keypair stored in EC2?

You  will still be able to connect to existing instances using the old
private ssh key, but you will not be able to start new instances using
the old keypair.  You will need to create a new ssh keypair in EC2 and
start new instances using that.  You could add the public key to
authorized_keys in existing instances so you can connect to all
instances using the same key.

Amazon allows us to upload our own X.509 certificate and private key
(for API access), but they do not allow us to upload our own ssh key
pair at this time.

--
Eric Hammond
ehammond at thinksome.com



Morgan O'Neal wrote:
> I had a developer delete a keypair. Anyway I can restore the keypair so
> it can be used on other insistences?
> 
> -- 
> Morgan O'Neal
> moneal at alpineinternet.com <mailto:moneal at alpineinternet.com>
> http://twitter.com/morganoneal
> 



More information about the Ec2 mailing list