views:

44

answers:

2

Hello,

I have this command openssl genrsa -des3 -out host.key 1024

it asks me for a password, I want to automate it!

how I can make it read the password from a text file (host.pass) so it will not ask me or have it ignore the password (which one is better?)

Thanks

+1  A: 

By omimtting -des3 you won't be prompted for a passphrase (i.e. the key will not be encrypted).

ThiefMaster
thanks allot, what about if I want to use a password from a file?
Data-Base
+2  A: 

Have a look at the manpage of openssl and genrsa. According to these you can use the option -passout file:host.pass.

musiKk