After spinning up Turbonomic's AMI in AWS, sometimes we need root access. This involves converting an RSA key into a .ppk and using that when PuTTYing into the instance as ec2-user. Unfortunately, the file that allows ec2-user to gain access from just a key file gets overridden. We want to continue to have root access. So:
1. PuTTY into your ec2 instance, and raise your privileges to super user. Here, I've opened up the file and highlighted the line that allows ec2-user root access:
You should close vim to be safe.
2. Update your instance. You can do that however you want (from the GUI, offline, or from command line), but it's extremely important that you keep your PuTTY instance with the root user open.
3. After the update has completed, open up vim editor for this file:
You'll see that our line is gone:
4. Append the file by typing a, and paste the following line back where it was:
ec2-user ALL=(ALL) NOPASSWD:ALL
5. Finally, stop appending by hitting esc, and save and quit by typing :wq!
6. You're all set!