Willie S.
Willie S.

Reputation: 1

What is the preferred method for generating strong passwords using bash?

I just call the following in a function, where $1 is the character length of the output:

    export LANG=C; cat /dev/random | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?=' | fold -w $1 | head -n 1

Upvotes: 0

Views: 42

Answers (1)

jil
jil

Reputation: 2691

I use tools like pwgen or apg. Or even something like

uuid | base64

Upvotes: 1

Related Questions