How to connect AWS EC2 instance through terminal

Step 1 – Ensure your EC2 instance is running

Step 2 – Get EC2 instance name or public ip .

Untitled

Step 3 – Locate your Key Pair ( you must need keypair to connect to AWS services programmatically )

Step 4 – grant sufficient access

chmod 400 myKeypair.pem

Step 4 – ssh to your ec2 instance

example –

ssh ec2-user@54.161.76.251 -i myKeypair.pem

or

ssh ec2-user@ec2-54-161-76-251.compute-1.amazonaws.com -i myKeypair.pem

ec2

One thought on “How to connect AWS EC2 instance through terminal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s