diff --git a/src/python/jw/pkg/lib/ec/SSHClient.py b/src/python/jw/pkg/lib/ec/SSHClient.py index aea5b63b..b5ffae05 100644 --- a/src/python/jw/pkg/lib/ec/SSHClient.py +++ b/src/python/jw/pkg/lib/ec/SSHClient.py @@ -130,9 +130,15 @@ class SSHClient(ExecContext): def username(self) -> str: return self.__username -def ssh_client(*args, type=['AsyncSSH', 'Paramiko', 'Exec'], **kwargs) -> SSHClient: # export +def ssh_client(*args, type: str|list[str]|None=None, **kwargs) -> SSHClient: # export from importlib import import_module errors: list[str] = [] + if type is None: + val = os.getenv('JW_DEFAULT_SSH_CLIENT') + if val is not None: + type = val.split(',') + else: + type = ['AsyncSSH', 'Paramiko', 'Exec'] if isinstance(type, str): type = [type] for name in type: