5.4. Gateway Messages

During the different phases of connection establishment, key-exchange, authentication and the end of a session, the gateway could get in a situation where it has to disconnect the client. When this situation arises, the suSSHi Gateway sends a DISCONNECT message to the client and, if there is already a connection to a target server, to the target server as well containing a reason code and a message.

All clients (at least the default ones and all the ones tested by us) will display this message together with the reason code after getting a DISCONNECT from the gateway. Some clients will also display a human readable text for each corresponding reason code.

5.4.1. RFC-defined Codes

Please find below the predefined DISCONNECT reason codes of SSH protocol version 2:

Reason Code

Meaning (as defined)

1

DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT

2

DISCONNECT_PROTOCOL_ERROR

3

DISCONNECT_KEY_EXCHANGE_FAILED

4

DISCONNECT_HOST_AUTHENTICATION_FAILED

5

DISCONNECT_MAC_ERROR

6

DISCONNECT_COMPRESSION_ERROR

7

DISCONNECT_SERVICE_NOT_AVAILABLE

8

DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED

9

DISCONNECT_HOST_KEY_NOT_VERIFIABLE

10

DISCONNECT_CONNECTION_LOST

11

DISCONNECT_BY_APPLICATION

12

DISCONNECT_TOO_MANY_CONNECTIONS

13

DISCONNECT_AUTH_CANCELLED_BY_USER

14

DISCONNECT_NO_MORE_AUTH_METHODS_AVAIL

15

DISCONNECT_ILLEGAL_USER_NAME

The message code varies from type to type and will inform the user about what happened.

5.4.2. Gateway Messages

The following listings cover the most important authentication and authorization messages a user may see:

5.4.2.3. Fatal messages

Status Code

Message / Description

5001

Internal Server Error

The Gateway or suSSHi Chef is suffering from an internal error.

5032

Failed to resolve target hostname

The Gateway could resolve the target hostname.