Search code examples
bashopensslubuntu-18.04

How to generate keys and save them to an external file?


I try to generate with OpenSSL a peer of key.

userner@userner-VirtualBox:/certs$ openssl genrsa 2048 >frugalCA.key

However, the output can not be generated in this file frugalCA.key and I got this error:

bash: frugalCA.key: Permission denied

I would be very grateful if you could help me pleaz?


Solution

  • It works for me with this command line:

    openssl genrsa 2048 | sudo tee  frugalCA.key