1 Answer
- Newest
- Most votes
- Most comments
0
This error (Error code: 0xd07) indicates that the Windows user account on your EC2 instance has been locked due to too many failed login attempts, even if you weren't the one making those attempts. This is a Windows security feature to prevent unauthorized access.
Here are some solutions to resolve this issue:
- Reset the password for the locked account. If you're using the default Administrator account, you can do this through the AWS Management Console by:
- Getting the password using your private key (.pem file)
- If you've changed the Administrator password since first launch, the stored password from your .pem file will no longer work
-
If your EC2 instance is managed in SSM Fleet Manager, you can use it to reset the password and unlock the account. This is often the easiest solution.
-
If your instance is not managed in SSM Fleet Manager, ensure that:
- Your EC2 instance can access the internet or SSM VPC endpoints
- The instance has the AmazonSSMManagedInstanceCore policy attached
- Try rebooting the server after making these changes
-
You can also use the EC2 Serial Console to access the instance and unlock the account if you cannot connect via RDP.
-
For additional security measures, consider:
- Using more complex passwords
- Temporarily disabling RDP access when not needed
- Enabling multi-factor authentication
- Reviewing your security group settings to ensure RDP (port 3389) is only accessible from trusted IP addresses
Sources
failing to connect to ec2. ERROR MES : Error code: 0xd07 Extended error code: 0x0. | AWS re:Post
Remote Desktop Connection ( account has been locked ) | AWS re:Post
Remote Desktop Connection ( account has been locked too many attempts ) | AWS re:Post
Unable to log into EC2 windows instance through RDP with the correct password(Had the correct private keys) | AWS re:Post
Relevant content
asked 2 years ago

You need to restrict RDP access to your specific IP address and wait 30 minutes or so.