Securing bash scripts

Posted by minnur on Server Fault See other posts from Server Fault or by minnur
Published on 2009-11-30T20:20:53Z Indexed on 2010/12/22 18:56 UTC
Read the original article Hit count: 390

Filed under:
|
|
|
|

Hi There,

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.

  1. We are storing the data in Rackspace Cloud files.
  2. We can't pull as Cloud files doesn't allow you run a script.
  3. 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?

Thanks

© Server Fault or respective owner

Related posts about security

Related posts about backup