Unable to SSH Windows Ec2 instance

0

Hi,

Created an EC2 instance on default VPC.
Added security group to allow all traffic (inbound and outbound)
Routing table includes the target as the internet gateway for source 0.0.0.0/0
I am able to connect to the EC2 instance through Remote Desktop.

Yet when I try to SSH using the following command,I get request timed out.
ssh -i <download pem file> ec2-user@<public ip>

Thanks in advance.

asked 2 years ago169 views
3 Answers
0

Hi SushilMathew

Thank you for posting your issue :)

By default, you will only be able to RDP (Remote Desktop) into your instance because this is a Windows Instance so it is not possible to SSH into. The SSH client is for connecting to Linux Instances. However, if you would like to SSH into your Windows instance then you will need to do some custom configurations by installing it on the instance.
The link below will give you details on how to get SSH to work on your Windows instance however one thing you need to remember is that the link provided is not an AWS link which means you will need to use it at your own risk.

https://medium.com/@pasindujay/how-to-connect-to-aws-ec2-windows-instance-with-openssh-b5dfd0a9e749

Kind regards

naz97
answered 2 years ago
0

Thank you so much. Is it possible to ping it? as i am facing the same issue with ping too

Edited by: SushilMathew on May 11, 2021 3:00 AM

answered 2 years ago
0

Hi SushilMathew

You're welcome :)

As per your first message, your security group allows traffic to everyone so that should be no problem if that was the case. However, you're having issues with the Ping utility because your Firewall is enabled in your Remote Desktop, to give you some more insight on this - Some firewalls will block ping signals by default. Windows devices have built-in firewalls which when enabled with default settings, will automatically block ping requests. The Ping Utility not working means that you are unreachable in the network, and ICMP is used to check if your server is reachable. So, with ICMP blocked, you will have issues when trying to ping your Windows Instance.

To resolve this you can connect to your Remote Desktop and navigate to the Control Panel > System and Security > Windows Defender Firewall and disable your firewall.

I hope this helps, please reach out if you have any other questions :)

naz97
answered 2 years 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