Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssh-add error: "Permissions are too open"

When trying to load my keys I get this error

ssh-add ~/.ssh
Permissions 0755 for '/home/starkers/.ssh' are too open.

Note that the permissions are too open for the .ssh directory, not an actual key.

Modifying the ownership doesn't change anything:

chmod 755 ~/.ssh
ssh-add ~/.ssh
Permissions 0755 for '/home/starkers/.ssh' are too open.

The thing is, I need to write to this directory when I create new keys, so what's it on about?

like image 245
Starkers Avatar asked Nov 14 '13 08:11

Starkers


1 Answers

Your .ssh directory should have permissions 0700. Not 0600 (too strict) or 0755 (too permissive). Do:

chmod -R 700 ~/.ssh

Use -R to recursively change permissions for all files in there.

like image 183
Simo A. Avatar answered Sep 30 '22 04:09

Simo A.