3 Answers
- Newest
- Most votes
- Most comments
1
- You can try to recover access via SSM Systems Manager:
- Ensure that the SSM Agent is installed and running on your instance. This is typically pre-installed on AWS Windows AMIs.
- Ensure that your instance has an IAM role attached with the necessary permissions for SSM. The role should have the
AmazonSSMManagedInstanceCore
policy attached.
- Reset the Password:
- Open the AWS Systems Manager console.
- In the left navigation pane, choose Run Command.
- Choose Run Command.
- In the Command document list, choose
AWSSupport-RunEC2RescueForWindowsTool
. - In the Targets section, choose the instance you want to reset the password for.
- In the Command parameters section, for Action, choose Reset Access.
- Optionally, you can specify a new password.
- Choose Run.
I tried method 2 but it failed
in this case you can create an AMI from your current instance and create new EC2 instance from the AMI you will have another connection details
1
Tahir, if none of the options work for you - then you have two other paths:
- If you made your instance from a standard AWS provided Windows AMI, then just make a new image from the running instance and launch a new instance from this AMI. This should reset the password and make it available for retrieval from the console using a new SSH key that you can generate for your instance and use to launch your instance. You can stop the old instance that you cannot login too before you do this, to stop incurring costs. If you have access to the new instance after this, you can terminate the old instance.
- If this does not work, you can also use the ec2-config service that is in the AMI (assuming it was originally an AMI provided by AWS) to reset the password for your user. In this case, stop the instance that you cannot login too. Detach the volume that is attached to it. Launch a new standard windows instance using an AWS provided AMI, and then attach the volume from the unreachable instance too it. The process to do so is documented here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ResettingAdminPassword_EC2Config.html
0
Hi tahir,
could you please go through the AWS Document link it will be help for you and you will get mote information.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/common-messages.html#password-not-available
Relevant content
- asked 4 years ago
- asked 3 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 8 months ago
please accept the answer if it was helpful