sshmitm.workarounds.channel module
Low-level paramiko channel helpers that rely on paramiko internals.
- sshmitm.workarounds.channel.request_pty_with_modes(channel, term, width, height, width_pixels, height_pixels, modes)
Request a PTY and forward terminal-mode bytes to the remote server.
Equivalent to Channel.get_pty() but passes modes instead of the empty byte string that paramiko hardcodes (RFC 4254 §8).
- Parameters:
channel (
Channel)term (
bytes|str)width (
int)height (
int)width_pixels (
int)height_pixels (
int)modes (
bytes)
- Return type:
None
- sshmitm.workarounds.channel.send_signal(channel, signame)
Send a signal over channel to the remote process (RFC 4254 §6.9).
Paramiko does not expose this as a public API, so we build the SSH_MSG_CHANNEL_REQUEST message directly. No reply is expected.
- Parameters:
channel (
Channel)signame (
str)
- Return type:
None