Openssl: cat: /dev/fd/63: No such file or directory

I try to create a Certificate Signing Request (CSR) using

openssl req -new -sha256 -key domain.key -subj "/" \ -reqexts SAN -config <(cat /System/Library/OpenSSL/openssl.cnf \ <(printf "[SAN]\nsubjectAltName=DNS:foo.com,DNS:"))

but getting the following error message on my macbook

cat: /dev/fd/63: No such file or directory

unknown option -reqexts

Any ideas?

2

4 Answers

Your command is probably copy&paste of a multi-line command where backslashes are used to join lines, however you somehow managed to get newlines converted to spaces.

Remove all occurences of "backslash + space".

0

I came across this question and in my case I did not have any \ , but I was using sudo so I had to use sudo su -c

$ sudo su -c 'openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-blah.blah.com.key -new -out /etc/ssl/certs/nginx-blah.blah.com.crt -subj "/O=" -reqexts SAN -extensions SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:blah.blah.com,IP:192.168.174.128")) -sha256' 

In some cases not mounted devpts can lead to the same error print. So needed to do: mount -t devpts devpts /dev/pts

/dev/fd is not an ordinary directory. In some case changing the user to root the rerunning the program could solve the problem.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like