If I set a passphrase on my private key like so:
openssl rsa -des -in insecure.key -out secure.key
and I remove the passphrase like so:
openssl rsa -in secure.key -out insecure.key
then my private key (insecure.key) ends up with a file mode of 644.
How can I tell openssl to create insecure.key with a file mode of 600 (or anything)?
I know that I can simply chmod the file afterwards, but what if I lose connection? Then there's a private key on the filesystem that anybody could read.