Last active
July 1, 2016 11:05
-
-
Save rakauchuk/97d2080daf29dac4c5f9 to your computer and use it in GitHub Desktop.
Generate a Random Password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ date +%s | sha256sum | base64 | head -c 32 ; echo | |
$ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo; | |
$ openssl rand -base64 32 | |
$ tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1 | |
$ strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo | |
$ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6 | |
$ dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev | |
$ </dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c8; echo "" | |
$ randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;} | |
$ date | md5sum | |
$ openssl genrsa -des3 -out private.pem 2048 | |
$ openssl rsa -in private.pem -outform PEM -pubout -out public.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment