I've written a script that clones new files from a remote server to my raspberry pi. The script automatically runs a couple of times a day and reads the login information for the server from a YAML configuration file. For security reasons, I want to encrypt the YAML file so that nobody form outside (internet) or inside (my roommates) can read the file and steal the login information without permission. So far, I've come up with a script that uses PyCrypto for AES encryption and decryption.
I don't get how to securely hide the key (used to encrypt and decrypt) the YAML config. Can somebody recommend a good strategy? The script needs to have access each time it is scheduled to run, in order to get the login information. Providing the key manually is thus not very handy.