The Maverick.NET SSH API

ForwardingClient.CancelRemoteForwarding Method (String, Int32, Boolean)

Cancels a remote forwarding listener.

[Visual Basic]
Overloads Public Function CancelRemoteForwarding( _
   ByVal addressBound As String, _
   ByVal portBound As Integer, _
   ByVal killActiveTunnels As Boolean _
) As Boolean
[C#]
public bool CancelRemoteForwarding(
   string addressBound,
   int portBound,
   bool killActiveTunnels
);

Parameters

addressBound
The listening address
portBound
The listening port
killActiveTunnels
Set to true if you want all the active tunnels to be dropped as well

Return Value

A value of true if the server reported that the forwarding was cancelled.

Remarks

Calling this method sends a request to the server to cancel a remote forwarding listener. The request may be denied. In the case of an SSH1 connection all requests to cancel will be denied as the protocol does not support the feature.

Exceptions

Exception Type Condition
SSHException Thrown if the forwarding listener specified does not exist.

See Also

ForwardingClient Class | Maverick.Forwarding Namespace | ForwardingClient.CancelRemoteForwarding Overload List