Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I failing to connect to my linux instance?

I have just launched an instance on AWS EC2 (free tier - t2.micro) - so I can start a Wordpress blog. I have tried connecting to this instance (using the basic 3 methods) so that I can download wordpress and get started. The problem is I am not able to connect to this instance using the 3 methods given.

I am running linux 18.04 on my laptop, so even on my AWS instance set up - I opted for Linux. When trying to connect with a standalone SSH client: I get this response ssh: connect to host ec2-198-51-100-1.compute-1.amazonaws.com port 22: Connection refused . When using EC2 Instance Connect : There was a problem setting up the instance connection An error occurred and we were unable to connect or stay connected to your instance. If this instance has just started up, try again in a minute or two. i get that response. With the last option of using Java SSH Client directly from my browser (Java required) - nothing happens when I click the launch ssh client blue button(it's as if it freezes). Has anyone else ever experienced this? how did they get through it?

like image 522
elolelo Avatar asked Aug 25 '19 12:08

elolelo


Video Answer


1 Answers

To answer myself - here is the solution that worked:

Since I hadn't specified a key pair when launching the ec2 linux instance. I terminated the instance and launch a new one (made sure the key pair is specified this time). I replaced the .pem file of my key pair,with a new one.

like image 62
elolelo Avatar answered Oct 18 '22 07:10

elolelo