fixed env vars

This commit is contained in:
rasmus 2020-12-22 01:55:26 +02:00
parent 8eeedab529
commit 81b2514a96
1 changed files with 3 additions and 3 deletions

View File

@ -14,13 +14,13 @@ import listServers, relativeUsage
"""
ENV VARIABLES AVAILABLE:
- hostname
- sshkeylocation (optional)
- sshkeylocation
- sshuser (optional)
"""
# Creds
hostname = str(os.environ['hostname'])
sshuser = str(os.getenv('sshuser', 'Administrator'))
sshkeylocation = str(os.path.abspath( os.getenv('sshkeypath', '~/.ssh/id_rsa') ))
sshuser = str(os.getenv('sshuser', 'Administrator'))
sshkeylocation = os.getenv('sshkeypath')
paramiko.transport.Transport._preferred_keys += ('ssh-dss',) # Allow the insecurities
ssh = paramiko.SSHClient() # Alias