RDP can't connect to running ec2 G instance

0

Hi there, as stated in title, I'm trying to connect through RDP on the windows app on my phone, I had one working the other day, but then it gave me a capacity error and wouldnt run, after I had already increased it, so I terminated my instance and decided to start from scratch.

My new instance runs perfectly fine, but now this one won't connect to my RDP app for some reason. It's stating the user name and password are incorrect, which can't be, because I'm decrypting the .pem file associated to the instance for the password, and using Administrator for the username which is set in the instance as well. I then try downloading the RDP file, and even that just plain fails to connect to my instance.

I have inbound rules set to open 0.0.0.0/0 for port 3389(RDP). Also tried setting it up directly for my IP and that didnt work either. So thats not the issue. I have tried making another new instance, and even that one didnt work. Im running out of ideas here... the instance runs fine, just can't connect to it through RDP.

Any ideas??

asked 10 days ago51 views
3 Answers
0

If you change the administrator password then the retrieval will never work again as thats a one off

If your EC2 has a public IP and you stop and start it, the IP will change

You can reset the Admin password using Systems Manager

EXPERT
answered 10 days ago
  • Huh, I don't recall changing the administrator password, other than setting it to the .pem file... also I have an elastic ip attatched to it, so ip shouldn't change. My bad i forgot to state that.

0

Based on your description, there are several potential reasons why you're unable to connect to your EC2 Windows instance via RDP:

  1. Security Group Configuration: While you mentioned that you've set up inbound rules for port 3389 (RDP) to allow traffic from 0.0.0.0/0 or your specific IP, it's worth double-checking that these rules are correctly applied to the instance.

  2. Network Configuration: Ensure that your EC2 instance is in a public subnet with an internet gateway attached. The route table for the subnet should have a route for 0.0.0.0/0 pointing to the Internet Gateway.

  3. Windows Firewall: The Windows Firewall on the instance might be blocking RDP connections. Unfortunately, you can't verify this until you can connect to the instance.

  4. Remote Desktop Service: The Remote Desktop Service (TermService) might not be running or properly configured on the instance.

  5. Password Issues: Even though you're decrypting the .pem file to get the password, there might be an issue with the password retrieval process or the Administrator account might be configured differently.

Here are some troubleshooting steps:

  1. Try using AWS Systems Manager to troubleshoot RDP issues. AWS provides an automation document called AWSSupport-TroubleshootRDP that can check or modify common settings affecting RDP connections.

  2. If your instance has the SSM agent installed and is registered with Systems Manager, you could try connecting via Session Manager as an alternative method.

  3. Consider stopping and starting the instance (not just rebooting). This can sometimes resolve connectivity issues.

  4. Verify that the instance status checks are passing. If one of the status checks is failing, it might indicate an issue with the OS that's preventing RDP connections.

  5. If you're using a G instance type specifically for GPU capabilities, ensure that you're using an AMI that has the appropriate GPU drivers installed.

If none of these solutions work, you might need to consider creating a new instance from a fresh AMI and ensuring all configurations are properly set up from the beginning.
Sources
Impossible to connect to ec2 windows instance | AWS re:Post
Troubleshoot issues connecting to your Amazon EC2 Windows instance - Amazon Elastic Compute Cloud
EC2 Instance Connect cannot connect to my instance ! | AWS re:Post

answered 10 days ago
EXPERT
reviewed 10 days ago
0

You mentioned it is failing to connect to the EC2 and that security group inbound rule is correct. Here are few things you can check.

  • NACL inbound rule - make sure the subnet's NACL allow inbound 3389 from our IP or 0.0.0.0/0. (Better not to use 0.0.0.0/0)
  • NACL outbound rule - make sure the subnet's NACL allow outbound on ephemeral port range 1024-63455. Note, NACL is rules are unidirectional, return traffic needs to be specified.
  • Since you are coming over the internet, what IP address are you using? Does it have a public IP? If not, you cannot connect to it. If it only has a private IP, you will need to access it from within your environment.

Instead of opening security groups rules, it's better just to use SSM Session manager. Note, you will need IAM role that allows SSM policy - arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore

answered 10 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions