Fixes for support different ssh ports to 22

This commit is contained in:
absurdo 2023-08-02 13:31:09 +02:00
parent 7c1b903d44
commit 05d8824d6f
9 changed files with 20 additions and 19 deletions

View file

@ -59,7 +59,7 @@ def start(cli_args=None):
if arr_task['ssh_port']!='':
default_port=int(arr_task['ssh_port'])
"""
if not commands_to_execute:
print('Error: no task files')
@ -160,7 +160,7 @@ def execute_task(arr_task):
taskmod=importlib.import_module(arr_task.get('path', ''))
ssh_task=taskmod.ServerTask(arr_task['server'], conn, remote_user=remote_user, remote_password=remote_password, private_key=private_key, password_key=password_key, remote_path='pastafari2', task_id=task_id, data=json.loads(arr_task['data']))
ssh_task=taskmod.ServerTask(arr_task['server'], conn, remote_user=remote_user, remote_password=remote_password, private_key=private_key, password_key=password_key, remote_path='pastafari2', task_id=task_id, data=json.loads(arr_task['data']), port=arr_task['ssh_port'])
ssh_task.exec()