unprotected private key file

David picture David · Sep 16, 2014 · Viewed 38.4k times · Source

Can someone explain this to please and what I can do to sort out my permissions issue. Its 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

Answer

rjv picture rjv · Sep 16, 2014

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