Skip to content

Conversation

@megabert
Copy link

@megabert megabert commented Apr 4, 2018

I'd like to have the possibility to have the password read from stdin to reduce the danger for the password to be easily captured when having root access to a XenServer.

At the moment the password is visible in the process list when directly supplied at the command line or nearly cleartext in the specified file base64-encoded.

That added change adds a third possibility: Specify "-" as the password in which case the password is read from stdin like this:

VmBackup.py - ".*" <<<'secret_password'

or

echo "$password" | ssh xenserver VmBackup.py - "vm-name-to-backup"

In this way the password is not shown in the process list and it does not have to be present on all XenServers. It can be kept on a secure remote machine, which initiates the start of the script.

NOTE:
I'm not really familiar with python very well, so look at my code with care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant