We have a situation like this. We have a Shell script in which we hard-coded the Password for a Production account. The script will login to another server using the hard-coded password and perform some operation.
We feel it's potentially unsafe hard-coding the password in the script, hence am wondering why don't we use an encrypted file which will contain password details and only during the execution, it will decrypt only during the execution. Please let me know if it is possible.
I'm aware of the other options like using SSH password less keys but my management isn't convinced with it.