Return to site

Random Password Cheat Sheet

How to create random passwords from the command line

· random password,command line,password,cheat sheet,windows


# openssl rand -base64 20
Example) YnKFUmVPYzQDrK3QT5NZ0Wh51kMBaXw=

# pwgen 10
Example) giepahl3Oy

# gpg --gen-random --armor 1 14 

Example) 1Hs0a5BYKlcRY0wvPy8=


PS> $Password = ([char[]]([char]33..[char]95) + ([char[]]([char]97..[char]126)) + 0..9 | sort {Get- Random})[0..8] -join ''
Example) Fj-Rs!4p2z

PS> dir C:\Windows\*.* | Get-Random | Get-FileHash -Algorithm SHA1

Example) 819AABA1653415766D4A6B0F5F89833F4E40AA27

Have more ideas on how to generate random passwords from the command line? @netmux on Twitter and let us know :)

All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OKSubscriptions powered by Strikingly