Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (790 points)
I am able to access my instance with a .pem key, but once I have added the public key to authorized keys I should be able to connect without .pem key as well but that is not happening.

1 Answer

0 votes
by (1.4k points)

You will require an ssh-agent to provide the .pem key during ssh

Here are the steps for the same :

1) Start the ssh-agent

eval `ssh-agent -s`

2) Add the .pem file to the agent

ssh-add <pem-key>

Now you no longer require a .pem file while you ssh into the EC2 instance

Hope this helps!

If you are still looking into expanding your knowledge regarding EC2 instances, check out :

Related questions

Want to get 50% Hike on your Salary?

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

0 votes
1 answer

Browse Categories