Unable to RDP to EC2 instance
Asked Answered
R

8

16

I created a VM using Hyper-V on my local machine which I can RDP onto fine. I exported the VHDX to VHD and then uploaded it to AWS via the API. This created a new EC2 instance for me but I cannot connect to it as it has no security keypair associated. Thus I created a private AMI from the instance and re-instantiated a new EC2 instance from this AMI, setting the keypair in the process to ensure HTTP, RDP etc are permitted. The EC2 instance is running, but when I download teh RDP shortcut if fails to connect. I've tried rebooting the instance several times (as this was one of the suggested solutions on here when I searched) but it hasn't helped.

I also cannot ping any of these instances via the public DNS or private DNS.

Any idea what I'm doing wrong? I'm not even getting as far as the password prompt, its the connectivity is the problem.

Thanks

Retrograde answered 15/1, 2013 at 20:18 Comment(0)
Q
33

I had a similar problem - this is the tip from the AWS documentation that helped me solve it:

Verify that the route table for the subnet has a route that sends all traffic 
destined outside the VPC (0.0.0.0/0) to the Internet gateway for the VPC

Additional debugging tips for this problem can be found here: Remote Desktop can't connect to the remote computer

Quadragesimal answered 28/8, 2014 at 18:20 Comment(5)
I had launched my instance into a VPC and this was the issue for me. Without all the necessary VPC routing it would've just connectedFixation
Thanks, I got the same issue and this answer did help. Just added a "New Route Rule" to the "Route Tables" for the Internet Gateway of your VPC.Unaesthetic
You are lucky you are not in the same room or I would have kissed you just now... :-)Hatti
It is crazy how difficult this was.Gujarat
@Quadragesimal -- cannot believe this was the solution to my public IP VM in AWS. You are a saviorAltis
E
8

The problem is probably the security group configuration attached to the instance. Make sure you have inbound TCP port 3389 permitted to be able to connect via RDP.

Emikoemil answered 15/1, 2013 at 20:21 Comment(3)
Yes, 80, 1433 (SQL) and 3389 are enabled for the security group. I've used this group to RDP to other AMI instances previously.Retrograde
Solved my problem!Vicinage
Thanks, it worked! I was using 'default' security group by AWS. It already had a rule for all traffic, all protocols, all ports. Still had to add 'RDP' specific rule. Doesn't it come under all traffic?Kalinin
C
8

in username type:

.\Administrator

....and your decrypted password

See, this is local user. but you dont know real local hostname, that different from public DNS name.

Was helpful for me, hope for you too.

Cespitose answered 14/6, 2013 at 9:59 Comment(1)
This solved my problem, Amazon has great documentation and should have a note about this. Thanks!Becket
J
0

My guess for the reason you aren't getting anywhere has to do with the host certificates.

Be mindful that each computer connecting to the server via RDP needs to have an IAM user in AWS with an X.509 certificate uploaded to their account.

When importing or creating a windows AMI it is best to install and configure the EC2Config service.

The EC2 Config service does the following when you launch the instance:

At initial setup:

  • Sets the hostname to the private DNS name
  • Generates and sets a random password on the Administrator account
  • Initializes and formats the ephemeral disks
  • Generates and installs the host certificate used for Terminal
    Services
  • Syncs the instance clock with a time server

After initial setup:

  • Writes the last three entries in the System event log to the Amazon EC2 console so you can debug startup problems.
  • Prepares instances for bundling

Also, by default, security groups do not allow you to ping the instances. You must enable ICMP in the security group.

Hope that helps.

EDIT: Here is the link to the 64bit version of the EC2Config Installer

Jody answered 17/1, 2013 at 0:8 Comment(0)
C
0

I also had the same problem. This is what I got from EC2.

Public DNS ec2-23-22-109-251.compute-1.amazonaws.com

User name Administrator

Password MyPassword

On the remote desktop, enter the domain and user name as ec2-23-22-109-251\Administrator

If you paste the password is may not work, try to paste it but reenter the last 1 or 2 characters. Once you get the security certificate prompt accept/install it and your connection should open soon.

Cesaro answered 10/4, 2014 at 18:41 Comment(0)
V
0

This is what worked for me: Use your cell phone as a "hot spot" - which gives you a static IP address. That worked. Now, I'll need to contact my Internet provider to assign a static IP to my wireless router. Currently, it is spitting out DHCP IP addresses.

UPDATE: 12.7.2016 You need to go to the Security Group, select the Instance, then EDIT the RDP. If you click "MyIP" that should work for those of us working from home. If you are onsite, you may need to put in a custom CIDR.

Vesper answered 4/12, 2016 at 23:37 Comment(0)
T
0

After rebooting an EC2 instance, I found that I needed to reassociate the Elastic IP address associated with the instance. You click the button below then select the instance and private instance IP address when prompted.

RDP access worked after this step.

enter image description here

Topaz answered 3/10, 2021 at 17:58 Comment(0)
N
0

After patching Windows 2019 on my server, I couldn't access the instance anymore despite all my working settings didn't change. I used EC2Rescue to fix my issue Please refer to the link below for details on how to use it: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/troubleshoot-connect-windows-instance.html#AWSSupport-ExecuteEC2Rescue

Nostradamus answered 16/2, 2022 at 7:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.