I created an ec2-instance with amazon-linux as my OS. I use to connect to the instance using PUTTY. everything was fine. now i changed the permission of some files in the instance to 0777 using chmod command. by mistake the permission of .pem file in the instance also got changed and i'm not able to connect the insatnce . getting error like Permission denied (public key).
Is there any way to change the permission of .pem file in the ec2-instance ?
Asked
Active
Viewed 544 times
0

Mohamed Uvais M
- 185
- 1
- 2
- 14
1 Answers
0
If you cant log in with the root user, nor any other user who could then elevate their privileges to root, you've probably bricked the machine. I dont believe, for example, Amazon will even retain a backdoor into the VM.

Henry
- 1,646
- 12
- 28
-
I believe `ec2-user` *is* root for Amazon-Linux. It might be worth raising a ticket on support but it's unlikely they'll be able to help. I hope you had good backup procedures in place / take decoupled microservices seriously ! – Henry May 24 '17 at 08:20