Hello i\'ve made a big mistake with may key pairs on a ec2 Instance. I can\'t connect with sftp and putty because the private key is wrong.
How can i get access to my in
Steps:
/dev/sdf
is the default)./home/ec2-user/.ssh
and /etc/ssh
from the new volume to the old volumeNow you can use the new key pair you generated for the new instance, to connect to your old one.
This did work for me and just a few notes:
You can't change the keys on a running instance using the AWS console. Is this an EBS-boot volume, or using instance store? If the former, there is a roundabout way of doing it. If the latter, you're pretty much out of luck and will have to terminate the instance and create a new one.
I think you need to rebuild the instance with a old(correct) key pair.
http://docs.amazonwebservices.com/AWSSecurityCredentials/1.0/AboutAWSCredentials.html#EC2KeyPairs