get ssh creds from .env
This commit is contained in:
parent
945b34d76c
commit
3db47346bd
1 changed files with 4 additions and 3 deletions
7
main.py
7
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:
|
||||
|
|
Loading…
Reference in a new issue