Unable to SSH to new instances unless its an AWS Ami

0

I'm encountering a weird issue. I'm unable to ssh to any instances other than anything thats an AWS AMI, even with default security groups with TCP open on port 22, and the exact same key pairs. All instances are using free tier eligible options). I can provide instance ids if needed to look into these issues further.

I created an instance with an AWS AMI (amzn2-ami-hvm-2.0.20190823.1-x86_64-gp2 (ami-0b69ea66ff7391e80)), newly created key pair (testing; testing.pem), and security group shows open TCP connections on port 22

I then also created an instance with Ubuntu 18.04 AMI (ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20191002 (ami-04b9e92b5572fa0d1)), the same key pair that was used above (testing; testing.pem), and security group shows open TCP connections on port 22.

AWS AMI ssh connection output

 
->> ~/.ssh $ ssh -i testing.pem ec2-user@54.167.74.46
Last login: Mon Oct 21 02:26:43 2019 from [redactedip]
       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/
15 package(s) needed for security, out of 31 available
Run "sudo yum update" to apply all updates.
[ec2-user@ip-172-31-88-246 ~]$ exit
logout
Connection to 54.167.74.46 closed.
->> ~/.ssh $ 

Ubuntu 18/04 ssh connection output

 
->> ~/.ssh $ ssh -i testing.pem ec2-user@184.72.150.242
Connection closed by 184.72.150.242 port 22
->> ~/.ssh $ 

Anything obvious that I'm missing?

Edited by: jackbeanstalk on Oct 20, 2019 8:13 PM : Removed my ip from the login message

질문됨 5년 전506회 조회
1개 답변
0
수락된 답변

On Ubuntu images, most of the time the login user is ubuntu.. Try this and yous should be able to connect.

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠