could anyone please list some options to save a set of credentials somewhere on a server where a bash file could access them? The script needs the credentials to log in to a server and collect data. I'm in a tight spot and need to find a quick solution and I have little experience with scripting. Some ideas I had:
Save credentials in a password protected hidden file and reference the variables from the script. However this leaves the credentials open to access if a malicious user has access to the script, right?
Somehow encrypting the password, but I have no idea how or how encrypting it would restrict access.
I appreciate any suggestions.