fixes and improvements
This commit is contained in:
@@ -41,12 +41,14 @@ def build_machine_client(machine: dict[str, Any]):
|
||||
key_directory = str(machine.get("key_directory") or "").strip()
|
||||
key_name = str(machine.get("key_name") or "").strip()
|
||||
key_path = f"{key_directory}/{key_name}" if key_directory and key_name else None
|
||||
settings = get_settings()
|
||||
return RemoteSSHClient(
|
||||
host=str(machine.get("host") or ""),
|
||||
username=str(machine.get("username") or ""),
|
||||
port=int(machine.get("port") or 22),
|
||||
key_filename=key_path,
|
||||
password=str(machine.get("password") or "") or None,
|
||||
known_hosts_path=str(settings.ssh_known_hosts_file),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user