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 "" -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 in main()


It appears that ssh closes all file descriptors early on in main() and as such does not support process substitution.

 * Discard other fds that are hanging around. These can cause problem
 * with backgrounded ssh processes started by ControlPersist.
closefrom(STDERR_FILENO + 1);

https://github.com/openssh/openssh-portable/blob/master/ssh.c#L621 https://github.com/openssh/openssh-portable/blob/c327813ea1d740e3e367109c17873815aba1328e/ssh.c#L621 (archive link)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.