pex.proto.ssh.client¶
Module Contents¶
- class pex.proto.ssh.client.SSHClient(host: str, port: int, username: str | None = None, password: str | None = None, timeout: int = 10)¶
Bases:
objectSubclass of pex.proto.ssh module.
This subclass of pex.proto.ssh module represents Python implementation of the SSH client.
- connect() None¶
Connect to SSH socket.
- Return None:
None
- Raises:
RuntimeError – with trailing error message
- disconnect() None¶
Disconnect from SSH socket.
- Return None:
None
- Raises:
RuntimeError – with trailing error message
- send_command(command: str) str¶
Send command to the SSH socket.
- Parameters:
command (str) – command to send
- Return str:
command output
- Raises:
RuntimeError – with trailing error message