From 3db47346bd909847df9b54350a512d1514b8e991 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Tue, 13 Aug 2019 09:28:55 +0500 Subject: [PATCH] get ssh creds from .env --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 8ce33e8..25f1829 100644 --- a/main.py +++ b/main.py @@ -17,6 +17,7 @@ import sshtunnel import errno from dataclasses import dataclass +from decouple import config from typing import Union from functools import wraps from string import Template @@ -236,9 +237,9 @@ def transfer_vm(request_event): if vm: tunnel = sshtunnel.SSHTunnelForwarder( (_host, 22), - ssh_username="meow", - ssh_pkey="~/.ssh/id_rsa", - ssh_private_key_password="***REMOVED***", + ssh_username=config("ssh_username"), + ssh_pkey=config("ssh_pkey"), + ssh_private_key_password=config("ssh_private_key_password"), remote_bind_address=('127.0.0.1', _port), ) try: