Can someone explain this to me please and what I can do to sort out my permissions issue. It seems to be stopping me from getting the authenticity of host heroku
and fixing my keys issues.
david@daniel-Inspiron-531:~$ ssh-add david/.ssh/id_rsa @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0775 for 'david/.ssh/id_rsa' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. david@daniel-Ins
The reason the "Warning: Unprotected Private Key File" AWS error occurs is because we're trying to SSH into an EC2 instance using a private key that allows read access to other users. A private key must only be readable by your user on the machine in order to allow you to SSH into an EC2 instance.
Open a terminal and use the ssh-keygen command with the -C flag to create a new SSH key pair. Replace the following: KEY_FILENAME : the name for your SSH key file. For example, a filename of my-ssh-key generates a private key file named my-ssh-key and a public key file named my-ssh-key.
I would recommend you to re create a set of keys using
ssh-keygen -t rsa -C '<email>'
for a more secure system. Else changing the permissions to something less open would do.
To change permissions, use
chmod 400 ~/.ssh/id_rsa
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With