2

I am getting this error:

Permissions 0660 for '/dev/fd/63' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored.

when I run this:

ssh-add <(echo '<private key content>')

is there a way to change the permissions on the "file"?

1 Answers1

1

The error message is pretty clear, and man ssh-add states:

 Identity files should not be readable by anyone but the user.  Note that
 ssh-add ignores identity files if they are accessible by others.

For some reason your file descriptor has 660, but needs 600 permissions. This is not the case for me, but I did yet not find a way to change that (maybe some udev rule).

You may use a pipe instead:

printf '%s' '<private key content>' | ssh-add -

Similar question:

pLumo
  • 22,565