Very similar to Failed to open config file '/dev/fd/63', error: No such file or directory for wpa_supplicant except for the fact that I am running as root.
bash-4.4# autossh -v -M 0 -4 -o StrictHostKeyChecking=no -F <(echo "$VA_SOCKS_PROXY_SSH_CONFIG") -i <(echo "$VA_SOCKS_PROXY_PRIVATE_KEY") socks -D "0.0.0.0:2001" -N
Warning: Identity file /dev/fd/62 not accessible: No such file or directory.
OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
Can't open user config file /dev/fd/63: No such file or directory
The output is failing in two places. If I do a ssh-add <(echo "$VA_SOCKS_PROXY_PRIVATE_KEY")
it works fine. Seems like the pipe is being read possibly by autossh first, then being read a second time by ssh (or vice versa) and therefore it is gone the second time.
UPDATE1: it appears running with just ssh
reproduces same errors, so my hypothesis above is invalidated.
UPDATE2: This comment says:
It seems
ssh
simply doesn’t support that mode of operation, because it closes FDs 3 and higher very early inmain()
mkfifo
work. (See also comment of Specify private key in SSH as string or SSH using keys in external storage - permissions?) – samm Apr 14 '21 at 08:16