lib.ec.ssh.AsyncSSH: Actually hide password #87

Merged
Jan Lindemann merged 1 commit from jan/fix/20260905-lib-ec-ssh-asyncssh-actually-hide-password into master 2026-09-05 21:02:15 +02:00 AGit

View file

@ -72,10 +72,9 @@ class AsyncSSH(Base):
} }
if self.__known_hosts is not _USE_DEFAULT_KNOWN_HOSTS: if self.__known_hosts is not _USE_DEFAULT_KNOWN_HOSTS:
kwargs['known_hosts'] = self.__known_hosts kwargs['known_hosts'] = self.__known_hosts
ret = {k: v for k, v in kwargs.items() if v is not None}
if hide_secrets and 'password' in kwargs: if hide_secrets and 'password' in kwargs:
kwargs['password'] = '<hidden>' kwargs['password'] = '<hidden>'
return ret return {k: v for k, v in kwargs.items() if v is not None}
@property @property
async def _conn(self) -> asyncssh.SSHClientConnection: async def _conn(self) -> asyncssh.SSHClientConnection: