Getting an error while generating ssl certificates

openssl

On entering the following command on centos terminal,

openssl rsa -in smtpd.key -out smtpd.key.unencrypted

I am getting the following error,

Error opening Private Key smtpd.key 3078141676:error:02001002:system library:fopen:No such >file or directory:bss_file.c:398:fopen('smtpd.key','r') 3078141676:error:20074002:BIO >routines:FILE_CTRL:system lib:bss_file.c:400: unable to load Private Key

Please help me in resolving this.

Best Answer

The file smtpd.key does not exist in your current directory.

Verify the path you are using, use the full path, or cd to the correct directory.