user1855093
user1855093

Reputation: 373

Resetting Administrator password for AWS EC2 Windows Server 2012 instance

I need to reset the Administrator password for our Windows 2012 AWS EC2 instance to gain access through RDP. I don't have the security key pair file and don't have the administrator password.

I followed the steps here: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ResettingAdminPassword_EC2Config.html

All of the steps seemed to work fine, except when I got to Step 5: Restart the original instance / 3. Retrieve your new Windows administrator password using the private key for the new key pair and connect to the instance. For more information, see Connecting to Your Windows Instance.

I restarted the original instance after following all of the steps, but when I go to Retrieve Default Windows Password, it is asking me to provide the original key pair (that I don't have) in order to decrypt the password. I tried putting in the new key pair that I generated with the temporary instance, but that did not work.

In short, I followed all of the steps to reset the admin password, but the end result is it is still asking for the original key-pair to decrypt the windows password.

Upvotes: 0

Views: 2376

Answers (1)

MisterSmith
MisterSmith

Reputation: 3644

You can change the key pair by creating an AMI, then recreate a new instance from the AMI. Last step in the launch wizard asks for the key pair.

Another option would be to use aws systems manager command to execute a batch/PowerShell script against your instance where you can create a temp user and add it to administrators group or just reset the administrator password.

Upvotes: 1

Related Questions