24

A while back, I came across a random password generator for the command line that displayed a grid of "memorable" passwords. Output was something like this:

adam@host:~$ CantRememberThisCommand
lkajsdf   aksjdfl
kqwrupo   qwerpoi
qwerklw   zxlkelq

The idea was that you could run this utility while someone was looking over your shoulder, and still pick a password with some level of secrecy due to the large number of choices.

I cannot remember what this utility was called. Oh interwebs, can you help?

Annika Backstrom
  • 858
  • 2
  • 7
  • 16
  • Not quite an answer to your question, but Steve Gibson has something like this available online at https://www.grc.com/ppp.htm – Tom A Feb 15 '10 at 19:20

4 Answers4

29

Sounds like you want pwgen.

alt text

There are also some interesting ways to do this without installing additional software, but the 5-letter command is a bit easier to remember :)

Gaff
  • 18,569
  • 15
  • 57
  • 68
John T
  • 163,373
  • 27
  • 341
  • 348
5

No need to install extra packages as OpenSSL should be installed on most machines. we can use the following code to generate an random password:

openssl rand -base64 10
Jackliusr
  • 159
  • 1
  • 3
  • 2
    This is very handy, but strictly speaking taking random bytes and encoding them as base64 string does not necessarily mean a random string. E.g. all 10 char passwords generated like this will end in '=' (because of padding). Also the only other non alpha numeric characters included in these are + and /, which may not be optimal. – Timo Oct 26 '16 at 12:25
  • 4
    Use a value that is a multiple of 3 (e.g. `openssl rand -base64 12`) and there will be no trailing `=` or `==`. – Daniel Earwicker Mar 08 '18 at 09:57
  • add `alias newpass="openssl rand -base64 12"` to shell config ie. _~/.zshrc_ for quick generation of random strings with `newpass` command – Sharak Feb 04 '19 at 11:39
4

According to your example output pwgen is a good guess (see the answer of John T). But there are many such tools available:

  • pwgen - generate pronounceable passwords
  • gpw - program to generate pronounceable passwords
  • apg - generates several random passwords

Also password managers such as KeePassX provide a passwort generator (but it does not focus on commandline usage nor on pronouncable passwords).

lumbric
  • 838
  • 1
  • 9
  • 17
0

Check out deepsix at http://ericandresen.me/technology/deepsix/ It is cross-platform developed in C and works on every platform I have tested it on, macOS, x86 & 64-bit Windows, and Linux. Just as you describe it offers -cNumber of Chars and -iIterations and at present offers uppercase, lowercase and numeric symbols.