The problem with EC2 instance when I try to connect via SSH. Authentication failed.Permission denied
- Stop the running EC2 instance
- Detach its
/dev/sda1volume (let's call it volume A) - Start new t1.micro EC2 instance, using a new key pair
- Attach volume A to the new micro instance, as
/dev/xvdf SSH to the new micro instance and $ sudo mkdir /mnt/tmp- $ mount /dev/xvdf
/mnt/tmp - $ cd /mnt/tmp and copy all needed data
- You can try to change keypair for you your old instance on a new
Copy~/.ssh/authorized_keysto/mnt/tmp/home/ubuntu/.ssh/authorized_keys - Logout
- Terminate micro instance
- Detach volume A from it
- Attach volume A back to the main instance as
/dev/sda1 - Start the main instance
- Login as before, using your new
.pemfile
