From 360d1f6b7e4d16e4f1e77c02fa77e1e268302c9f Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Wed, 14 Jun 2023 14:45:23 +0200 Subject: [PATCH] remove identity file --- src/utils/proxmox_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/proxmox_utils.py b/src/utils/proxmox_utils.py index 45d59b7..f1399be 100644 --- a/src/utils/proxmox_utils.py +++ b/src/utils/proxmox_utils.py @@ -177,7 +177,7 @@ def run_command_on_pve(command: str, return_status_code: bool = False, exception logging.debug(f"Running command on PVE (ssh): {command}") # catch errors code - command = subprocess.run(f'ssh -i {get_identity_file()} {username}@{host} -p {port} "{command}"', shell=shell, capture_output=True, + command = subprocess.run(f'ssh {username}@{host} -p {port} "{command}"', shell=shell, capture_output=True, encoding="utf-8") # If return code is not 0 and that exception_on_exit is True and return_status_code is False, throw an exception @@ -414,7 +414,7 @@ def copy_file_to_pve(path: Path, destination: str): config = get_config() # copy the file to the PVE from the local machine - run_command_locally(command=f"scp -i {get_identity_file()} {str(path)} {config['pve']['user']}@{config['pve']['host']}:{destination}", + run_command_locally(command=f"scp {str(path)} {config['pve']['user']}@{config['pve']['host']}:{destination}", return_status_code=True)