Generate Strong Passwords on the Command Line With OpenSSL

By | 2015/10/03

openssl can be used to generate random strings which make good passwords. Check it out!


The following command will create a random 24 character password:

openssl rand -base64 24

Example output:

stmiller@brahms ~ $ openssl rand -base64 24
tFldnV0ekZFveF4uqTFRBTupW3m76yyW

Adjust the length as needed. Need a 254 character password? 🙂

stmiller@brahms ~ $ openssl rand -base64 254
FUR14SSwLwUG7KcZaUGmkJUAdG5m6UijeGGP6yH9n/dB5fOua8nQ2y642RmmAMMG
oGGhfbH9bhgGjbIy0kJFHtPu39ALhws7KrEmWY53mT3W9N/ft7p1RyraKge4HBPI
U8oqYoeuDVsq6qP9lg+BQbQbc2tJAQd6Ta/7fSYa8ScqA0F7p3yxFliMcA2dFrI9
/diEYJ8Q9CZokQ6/2vQvvleoxb/fvss5CXXSf9XItUbnOw6YjR/7OIqiUM/92kZO
yNtm8hYGCg6ymgCa29Pj8wOCiz33Vioy+ms9EuznOkAsoOhPk6lYtIX6784YXMRa
VBclPLT9nf4qDUl5RIE=


Hack on,

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.