Skip to main content Logo (IEC resistor symbol) logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

OpenSSL - Generate Psuedo Random Passwords

Published: 26-07-2013 | Author: Remy van Elst | Text only version of this article

Table of Contents

This a snippet to generate a psuedo random password fast via the command line with OpenSSL. It 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.

If you like this article, consider sponsoring me by trying out a Digital Ocean VPS. With this link you'll get $100 credit for 60 days). (referral link)

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


openssl rand -base64 48

openssl rand -base64 10

openssl rand -hex 48

openssl rand -hex 8
Tags: base64 , hex , openssl , password , snippets , ssl