Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (29.3k points)

I am trying to login to the ec2 instance through the ubuntu terminal. It is showing following error, Warning: Identity file aws-foundation-key-pair.pem not accessible: No such file or directory. [email protected]: Permission denied (public key). So please tell me how to connect or login both. For more information refer to the attachment.

1 Answer

0 votes
by (50.2k points)
edited by

You need to have the key pair inside the virtual box Linux machine and then you can run the command for ssh.

So, copy the key to the Linux machine and open the terminal where the key pair is present.

Then run the below commands for ssh:

sudo chmod 400 <key-pair name>

ssh -i ./<keypair.pem> <usernameof machine>:<IP address>

The above syntax will help you to ssh in to your instance from linux machinne.

For more information, check out this AWS Tutorial.

Related questions

+1 vote
1 answer
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Mar 19, 2020 in AWS by chandra (29.3k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...