Back to product page

ExitReason property


Holds reason for disconnection provided by remote side.

Type

A ExitReasonsEnum enumeration.

Syntax

  • Basic
object.ExitReason [= value]  
The ExitReason(object,value) syntax has these parts:
objectAn expression evaluating to an object of type SSHUser.
valueA ExitReasonsEnum enumeration, as described in settings.

Remarks

The settings for KeyType are:

Constant Value Description
ReasonUnknown0 Unknown reason.
ReasonHostNotAllowedToConnect 1 Host not allowed to connect.
ReasonProtocolError2 Protocol error.
ReasonKeyExchangeFailed 3 Key exchange failed.
ReasonReserved4 Reserved.
ReasonMacError 5 Mac error.
ReasonCompessionError6 Compression error.
ReasonServiceNotAvailable 7 Service not available.
ReasonProtocolVersionNotSupported8 Protocol version not supported.
ReasonHostKeyNotVerifiable 9 Host key not verifiable.
ReasonConnectionLost10 Connection lost.
ReasonDisconnectByApplication 11 Disconnect by application.
ReasonTooManyConnections12 Too many connections.
ReasonAuthCancelledByUser 13 Authentication cancelled by user.
ReasonNoMoreAuthMethodsAvailable14 No more authentication methods available.
ReasonIllegalUserName15 Illegal user name.

ExitReason property holds reason code provided by the client when he sent disconnect packet to close the connection. This packet is optional, and sent only by some clients. If set, wodSSHServer will put that code to ExitReason property, and text description the reason to ExitDescription property.

You should check this value in Disconnected event.


Platforms

Windows