Access Amazon Elastic Compute Cloud (EC2) Remotely via SSH

Go to EC2 Dashboard then navigate to Intances

EC2 Dashboard

EC2 Dashboard

Select the instance then click Connect button

Instance Detail

Instance Detail

A window pops up will show up with a few info about how to connect to an instance

How to Connect to Instance

How to Connect to Instance

NOTE: The key-pair example-key.pem is generated when you first time launch an instance


Command to apply chmod 400 to key-pair

chmod 400 /path/to/example-key.pem

Command to connect to instance via SSH

ssh -i "/path/to/example-key.pem" user@public-dns-example.com

In this example, I use terminal ubuntu desktop to connect to EC2 instance

Terminal Ubuntu

Terminal Ubuntu Desktop

Successfully connect to instance

Successfully Connect to Instance

Successfully Connect to Instance

#aws   #cloud   #ssh