Sunday, November 18, 2018

Generate a psuedo random password

How to generate a psuedo random password fast via the command line with OpenSSL

To generates a number of random bytes, which can either be output raw, as Base64 or as HEX. The Base64 output is a good password most of the time.

# Base64
openssl rand -base64 NUMBER
openssl rand -hex NUMBER

[root@dfdf41f1677a /]# openssl rand -base64 48