How to pass to ssh the key stored in a shell environment variable?
16
votes
4
answers
38715
views
Presumably
ssh
tries to access the fd
several times, but the fd
is destroyed after it has been read the very first time:
# ssh -i <(echo $KEY) user@example.com
Warning: Identity file /dev/fd/11 not accessible: Bad file descriptor.
user@example.com: Permission denied (publickey).
Is there any other way without writing/removing temporary file?
Asked by NarūnasK
(2525 rep)
Apr 23, 2019, 11:56 AM
Last activity: Oct 20, 2023, 01:22 PM
Last activity: Oct 20, 2023, 01:22 PM