fixed env vars
This commit is contained in:
parent
8eeedab529
commit
81b2514a96
6
main.py
6
main.py
|
@ -14,13 +14,13 @@ import listServers, relativeUsage
|
||||||
"""
|
"""
|
||||||
ENV VARIABLES AVAILABLE:
|
ENV VARIABLES AVAILABLE:
|
||||||
- hostname
|
- hostname
|
||||||
- sshkeylocation (optional)
|
- sshkeylocation
|
||||||
- sshuser (optional)
|
- sshuser (optional)
|
||||||
"""
|
"""
|
||||||
# Creds
|
# Creds
|
||||||
hostname = str(os.environ['hostname'])
|
hostname = str(os.environ['hostname'])
|
||||||
sshuser = str(os.getenv('sshuser', 'Administrator'))
|
sshuser = str(os.getenv('sshuser', 'Administrator'))
|
||||||
sshkeylocation = str(os.path.abspath( os.getenv('sshkeypath', '~/.ssh/id_rsa') ))
|
sshkeylocation = os.getenv('sshkeypath')
|
||||||
|
|
||||||
paramiko.transport.Transport._preferred_keys += ('ssh-dss',) # Allow the insecurities
|
paramiko.transport.Transport._preferred_keys += ('ssh-dss',) # Allow the insecurities
|
||||||
ssh = paramiko.SSHClient() # Alias
|
ssh = paramiko.SSHClient() # Alias
|
||||||
|
|
Loading…
Reference in New Issue