Generate Strong Passwords

Published on January 24, 2011, by in linux.



How can I generate strong passwords from the command line?

The excellent program apg is fantastic for generating all sorts of passwords.

1. Install apg:

$ sudo apt-get install apg

2. Then you can simply run

$ apg

…which will run default options and give something like this:

stmiller@li166-66:~$ apg

Please enter some random data (only first 8 are significant)
(eg. your old password):>
Evnupthyac6 (Ev-nup-thyac-SIX)
AsofMiWor7 (As-of-Mi-Wor-SEVEN)
Plotyujpak4 (Plot-yuj-pak-FOUR)
OwIvnupel8 (Ow-Iv-nup-el-EIGHT)
ladjothPeg4 (lad-joth-Peg-FOUR)
cluHosoys5 (clu-Hos-oys-FIVE)



Customize options as desired like:

$ apg -a 1 -m 16 -M SNCL -n 1

-a 1 = random (un-pronounceable password)
-m 16 = 16 characters in length
-M SNCL = use Special symbol, Number, Capital, and Lowercase
-n 1 = generate 1 password

The above command gives me this, for a random (pun) example:

Yy%$+&|6ra-y+S5n


Obviously you can customize the command line options to fit your desired password requirements!

[More info on apg]


Related posts:

  1. Thunderbird Recover Email Password
  2. SSH Key Pair to Login Without Password

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Generate Strong Passwords
© Copyleft scottlinux.com CC BY-SA 3.0