Created
June 4, 2014 17:46
-
-
Save bwiggs/05ca7cc51e610bc3fab1 to your computer and use it in GitHub Desktop.
CLI Password Generator with openssl
This file contains hidden or 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
function genpasswd() { | |
let passwordLength=${1:-48} | |
openssl rand -base64 $passwordLength | cut -c 1-$passwordLength | |
} | |
# $ genpasswd 24 | |
# qPE5rpQOF74k8SoibCFzhlwp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you add | pbcopy to this line it will be in your clipboard. :)