I have a Bash script that automatically authenticates with a service using my username and password. The credentials are currently stored as plain text within the script.
What precautions should I take to most securely store these credentials while still allowing the script access?
Points of clarification:
- I understand that, if available, other methods of authentication should be used instead. I still want to know what to do in the case that password authentication is the only option.
- Not storing the password at all is not an acceptable answer here. I am asking about the case in which the script must have unattended access to the password.