More Ways To Generate Strong Passwords In Linux

In today’s article, we’re going to explore a couple of other ways to generate strong passwords in Linux. It’s going to be a pretty easy task and one most everyone can learn from. It shouldn’t even be a very long article.

Weak passwords are easy to crack. You don’t want that, for obvious reasons. If you want to see how approximately how long it’ll take to brute force passwords, you can check sites like this one. Remember that the time given by that is more or less the maximum time it could take, and your password could be brute-forced (by repeated guessing) much sooner than that.

I’ve previously written an article about generating a sufficiently complex password. That’d be one way to generate strong passwords, but this article will cover a couple of other easy ways to generate strong passwords in the Linux terminal.

Generate Strong Passwords:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your password open, we’re first going to use GPG to create a strong password. Everyone should already have GPG installed, so there’s no reason to cover that in this article. So, to do so, you’d use a command something like this:

It’ll have an output similar to this one:

using gpg to generate a strong password
Obviously, you don’t want to use that password specifically! Use your own!

You can change the 16 to any length you want. It’s obviously the number of characters. 

You can also use OpenSSL, which you likely have installed, to generate a complex password. It’s actually pretty easy and the command is:

Again, you can change the 24 to anything  you darned well please. Sometimes sites will have a maximum password length, which might seem kinda silly – as I think I recall there being a hard limit of 256 characters that the kernel will accept. Either way, the output would be similar to this one:

openssl can generate passwords too
That one is 24 characters long. Yay!

Feel free to mess around with changing the length. OpenSSL is likely installed by default and you don’t have to install pwgen. Both of the tools in this article will likely be installed by default.

Closure:

And there you have it! Another article said and done. This one is about teaching folks how to generate strong passwords in Linux. It’s an easy enough task and this article shouldn’t be too complicated for even the most n00b of the n00bs!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

 

Subscribe to Newsletter!
Get notified when new articles are published!
We promise to never share your email!
icon

Author: KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Leave a Reply

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

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.