IPWorks SSH 2020 Python Edition

Questions / Feedback?

on_ssh_channel_open_request Event

Fired when the peer attempts to open a new channel.

Syntax

class SSHReverseTunnelSSHChannelOpenRequestEventParams(object):
  @property
  def channel_id() -> str: ...
  @property
  def service() -> str: ...
  @property
  def connected_address() -> str: ...
  @property
  def connected_port() -> int: ...
  @property
  def origin_address() -> str: ...
  @property
  def origin_port() -> int: ...
  @property
  def accept() -> bool: ...
  @accept.setter
  def accept(value) -> None: ...

# In class SSHReverseTunnel:
@property
def on_ssh_channel_open_request() -> Callable[[SSHReverseTunnelSSHChannelOpenRequestEventParams], None]: ...
@on_ssh_channel_open_request.setter
def on_ssh_channel_open_request(event_hook: Callable[[SSHReverseTunnelSSHChannelOpenRequestEventParams], None]) -> None: ...

Remarks

This event is fired whenever a peer attempts to open a new channel for a given connection. ChannelId will contain the id of the channel to be created. Service will identify the type of channel that is being requested. Usually, this will be "forwarded-tcpip", in which case ConnectedAddress and ConnectedPort will contain the remote TCP/IP address and port on the peer to which the connection was established; OriginAddress and OriginPort contain the originating TCP/IP address and port of the connection.

By default Accept is True and the channel will be opened. Set Accept to False to reject the request.

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 Python Edition - Version 20.0 [Build 8501]