From 81b2514a96f7d01d92fab3d02895954c5f27a7cb Mon Sep 17 00:00:00 2001 From: rasmus Date: Tue, 22 Dec 2020 01:55:26 +0200 Subject: [PATCH] fixed env vars --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 5ff30c1..11e19cd 100644 --- a/main.py +++ b/main.py @@ -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