SSHChannelOpenRequest Event

Fired when the peer attempts to open a new channel.

Syntax

public event OnSSHChannelOpenRequestHandler OnSSHChannelOpenRequest;

public delegate void OnSSHChannelOpenRequestHandler(object sender, SshreversetunnelSSHChannelOpenRequestEventArgs e);

public class SshreversetunnelSSHChannelOpenRequestEventArgs : EventArgs {
  public string ChannelId { get; }
  public string Service { get; }
  public string ConnectedAddress { get; }
  public int ConnectedPort { get; }
  public string OriginAddress { get; }
  public int OriginPort { get; }
  public bool Accept { get; set; }
}
Public Event OnSSHChannelOpenRequest As OnSSHChannelOpenRequestHandler

Public Delegate Sub OnSSHChannelOpenRequestHandler(sender As Object, e As SshreversetunnelSSHChannelOpenRequestEventArgs)

Public Class SshreversetunnelSSHChannelOpenRequestEventArgs Inherits EventArgs
  Public ReadOnly Property ChannelId As String
  Public ReadOnly Property Service As String
  Public ReadOnly Property ConnectedAddress As String
  Public ReadOnly Property ConnectedPort As Integer
  Public ReadOnly Property OriginAddress As String
  Public ReadOnly Property OriginPort As Integer
  Public Property Accept As Boolean
End Class

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 .NET Edition - Version 20.0 [Build 8501]