sshmitm.forwarders.ssh module
- class sshmitm.forwarders.ssh.SSHBaseForwarder(session)
Bases:
BaseForwarderSpecifies the interface responsible for managing SSH terminal sessions, including shell interaction and command execution.
- Parameters:
session (
Session)
- check_if_channels_are_closed()
- Return type:
bool
- property client_channel: Channel | None
Returns the client channel for the current plugin type
- class sshmitm.forwarders.ssh.SSHForwarder(session)
Bases:
SSHBaseForwarderTransparent SSH plugin — forwards the terminal session unchanged.
This is the base class for all SSH terminal plugins. Inherit from this class to implement custom SSH behaviour; override only the methods you need.
- Parameters:
session (
Session)
- forward()
Forwards data between the client and the server
- Return type:
None
- forward_extra()
- Return type:
None
- forward_stderr()
- Return type:
None
- forward_stdin()
- Return type:
None
- forward_stdout()
- Return type:
None
- handle_client_data(data)
- Parameters:
data (
bytes)- Return type:
bytes
- handle_server_data(data)
- Parameters:
data (
bytes)- Return type:
bytes
- handle_server_error(data)
- Parameters:
data (
bytes)- Return type:
bytes