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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ