Monday, October 25, 2021

[SOLVED] Cannot ssh into EC2 instance from Windows using Putty

Issue

I was using a Mac to ssh into my ec2 instance, I am now using a Windows laptop and I cannot connect to the ec2 instance, any recommendations? I have followed the instructions using Putty but it still does not connect. I have even tried using MobaXterm to ssh into my a Ubuntu machine and then ssh from there and that still does not work either. I receive timeout errors in both cases. I have also checked the VPC and Subnets and everything in the route table is connected to each other how it should be. The Mac connection still works but I am just having trouble connecting through the Windows machine (using Putty).


Solution

The following is a helpful walk through guide: https://www2.linuxacademy.com/howtoguides/17385-use-putty-to-access-ec2-linux-instances-via-ssh-from-windows/

•For an Amazon Linux AMI, the user name is ec2-user.

•For a RHEL AMI, the user name is ec2-user or root.

•For an Ubuntu AMI, the user name is ubuntu or root.

•For a Centos AMI, the user name is centos.

•For a Fedora AMI, the user name is ec2-user.

•For SUSE, the user name is ec2-user or root.

•Otherwise, if ec2-user and root don’t work, check with the AMI provider.

  • Open Putty and add your the [email protected] (replace with your ec2's IP) to the host section
  • use port 22
  • Click the 'Auth' section on the right panel and select your .ppk file
  • Go back to the 'Session' section and click 'open'


Answered By - Thomas Burke