Security News > 2022 > April > How to safely store passwords on a Linux server
How many times have you been working on a Linux server and wished you had the means to safely store passwords? Having such a feature available to your headless servers would be such a time saver.
SEE: Password breach: Why pop culture and passwords don't mix.
Using the pass command, we can create directories to house related passwords.
Let's say you want to first create a directory to house passwords for websites and the first entry will be for TechRepublic.
The caveat is that you should always remember to run the gpg-connect-agent command before you log out of your SSH session, otherwise the password will remain cached for a while, and someone might be able to then log into your server with your credentials and steal your password.
That's all there is to safely store passwords on a headless Linux server with GnuPG and the pass command.
News URL
https://www.techrepublic.com/article/how-to-safely-store-passwords-linux-server/