Intellipaat Back

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

I just created an Ubuntu instance on EC2, but when I try and SSH into the machine, I get:

UNPROTECTED PRIVATE KEY FILE!  

permissions 0644 for 'xxxxx.pem' are too open.

It is recommended that your private key files are NOT accessible by others.

This private key will be ignored.

bad permissions: ignore key: xxxxx.pem

Permission denied (publickey).

In creating the key, you only enter a name (without the option of adding a password).

How can I SSH into the machine without this warning popping up?

1 Answer

0 votes
by (44.4k points)

The private keys should only be readable to the owner. Do the below command on the machine which you want to connect:

chmod 400 yourkeypair.pem

Related questions

Want to get 50% Hike on your Salary?

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

0 votes
1 answer
+1 vote
1 answer

Browse Categories

...