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
|
import errno
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from decouple import config
|
||||||
from typing import Union
|
from typing import Union
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from string import Template
|
from string import Template
|
||||||
|
@ -236,9 +237,9 @@ def transfer_vm(request_event):
|
||||||
if vm:
|
if vm:
|
||||||
tunnel = sshtunnel.SSHTunnelForwarder(
|
tunnel = sshtunnel.SSHTunnelForwarder(
|
||||||
(_host, 22),
|
(_host, 22),
|
||||||
ssh_username="meow",
|
ssh_username=config("ssh_username"),
|
||||||
ssh_pkey="~/.ssh/id_rsa",
|
ssh_pkey=config("ssh_pkey"),
|
||||||
ssh_private_key_password="***REMOVED***",
|
ssh_private_key_password=config("ssh_private_key_password"),
|
||||||
remote_bind_address=('127.0.0.1', _port),
|
remote_bind_address=('127.0.0.1', _port),
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue