Does anybody know what is the best way to secure bash scripts. I have a script which creates database and source code backup and ftp it to other server. And login/password for destination ftp are plain text. I need somehow encrypt it or hide it in case of website hacking. Or should i create script written on C to create bash file then run it and delete ? Thanks.
Thanks for the answers and I am sorry, i wasn't clear enough. I would like to clarify my question in the following items.
- We are storing the data in Rackspace Cloud files.
- We can't pull as Cloud files doesn't allow you run a script.
- We can write the script to run on Server A and pull FTP and MySQL data on servers B, C, D, etc. And we want to protect the passwords on A from the situation where A is hacked. Can we compile our script file to hide them?