Secure Passwords Using SSL
If you have ever had to attempt to create a secure password, you may have undoubtedly tried to join together phrases, words and numbers in a seemingly random manner. We've all done it. But did you know that the ability to create secure passwords is no further away than the command line?
Enter the following at a command line prompt in terminal:
openssl rand -base64 6
This will create an eight character password, comprised of 6 random bits of base64-encoded data. Would you like a randomly generated 16 character password? Enter the following at the command line prompt in terminal:
openssl rand -base64 12
When we send random data through the base64 encoding process, the output string length will always be a multiple of four. If there isn't enough random data, "=" will be added to the end of the string to pad it out until the string length is a multiple of four.
So then, what do we do if we want to generate a random 25 character string to use as a WPA key? We will have to chop it off ourselves. Enter the following at the command line prompt in terminal:
openssl rand -base64 25 | cut -c1-25
Be sure to record your newly generated password in a secure place, should you ever forget it. With the number of possibilities, it's astronomically unlikely that you will generate the same password again.
You may also add redirection to the end of the above commands, to save your new password into a file, which can (should) be moved to a secure folder on your computer.
For example, "openssl rand -base64 6 > pass8", will save the generated password into a file, named "pass8". You can name the file whatever you like -- just be sure to move it to the secure folder, to keep it from "prying eyes." After all, there is nothing quite like forgetting your old passwords.