2

I went through the AWS document and followed it step by step for the connection timeout. It looks like I have done everything right, but the problem still persists.

I am using a Windows instance and was wondering what is the AMI user name for it? I am trying to use ec2-user and root. But the connection times out for both making it unclear about the right username.

Also, other means to resolve the issue please.

dpm
  • 235
  • 2
  • 16
  • Are you sure that you are using public IP and ssh port 80 is open ? Have you tried Administrator as username ? – Mike Kor Jan 11 '16 at 15:49
  • 4
    I think you are confusing Windows and Linux. You cannot SSH into Windows by default unless you install an SSH server yourself. You can RDP (Remote Desktop) into it though. Also the default username is Administrator for Windows instances. ec2-user and root are used in Linux instances – Volkan Paksoy Jan 11 '16 at 16:01
  • @MikeKor I have enabled the ssh traffic in the security group and the port number is 22, not 80. I tried Administrator after checking 'echo %username%' in the VM cmd, that does not establish a connection either – dpm Jan 11 '16 at 16:06
  • @VolkanPaksoy: Yes, I have installed OpenSSH on windows. RDP simply starts the VM. I am trying to figure out why the web application running on the private IP of the VM is not accessible from the internet using the elastic IP of the instance. – dpm Jan 11 '16 at 16:08
  • @dpm: Default RDP port is 3389. Make sure that's allowed for inbound traffic before you try. If you already have SSH you have to manage its users separately. Local Windows admin account doesn't much to OpenSSH. Just out of curiosity, how did you manage to install OpenSSH without connecting to it remotely? Did you launch the instance from an AMI? Because in that case the password will be whatever it was when the image was created – Volkan Paksoy Jan 11 '16 at 16:12
  • @VolkanPaksoy: I used RDP and launched my instance to install OpenSSH. – dpm Jan 11 '16 at 16:33
  • 1
    ok cool, so you already knew about it. I think the only confusion is you cannot use windows account with SSH and you have to manage those users separately – Volkan Paksoy Jan 11 '16 at 16:35
  • @VolkanPaksoy: Thanks. I appreciate all the help. – dpm Jan 11 '16 at 16:39

3 Answers3

3

The default username for AWS windows account should be administrator. source

Mike Kor
  • 876
  • 5
  • 14
1

My debugging steps to EC2 connection time out

  1. Double check the security group access for port 22

  2. Make sure you have your current IP on there and update to be sure it hasn't changed

  3. Make sure the key pair you're attempting to use corresponds to the one attached to your EC2

  4. Make sure your key pair on your local machine is chmod'ed correctly. I believe it's chmod 600 keypair.pem check this

  5. Make sure you're in either your .ssh folder on your host OR correctly referencing it: HOME/.ssh/key.pem

  6. Last weird totally wishy washy checks: reboot instance, assign elastic IP and access that, switch the @publicIP to @publicDNS, add a : at the end of user@ip:, etc. Totally mystical debugging sets for 6 though. That's part of the "my code doesn't work - don't know why. My code does work - don't know why." Category

Community
  • 1
  • 1
iSkore
  • 7,394
  • 3
  • 34
  • 59
1

Check that port 22 is open in security group associated to your ec2 machine. SSH protocol works on the 22 port by default. Also, check that public IP is assigned to the machine and you are using public IP to SSH (not private IP)

Moinuddin Quadri
  • 46,825
  • 13
  • 96
  • 126