Top Description Inners Fields Constructors Methods
org.apache.sshd.common

public final Class SshConstants

extends Object
Class Inheritance
Imports
java.util.Collection, .Collections, .HashSet, .Map, .Set, java.util.function.IntUnaryOperator, org.apache.sshd.common.util.GenericUtils, org.apache.sshd.common.util.logging.LoggingUtils

This interface defines constants for the SSH protocol.
Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final IntUnaryOperator
TO_EFFECTIVE_PORT

Converts non-positive port value to 22

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Set<Integer>

Returns:

A Set of opcodes that are used by several different messages
getAmbiguousOpcodes
()

public static String

Returns:

The user-friendly name - if not one of the defined SSH_MSG_XXX values then returns the string representation of the command's value
getCommandMessageName
(int
The command value
cmd
)

Converts a command value to a user-friendly name

public static String

Returns:

The user-friendly name - if not one of the defined SSH2_DISCONNECT_ values then returns the string representation of the reason's value
getDisconnectReasonName
(int
The disconnect reason value
reason
)

Converts a disconnect reason value to a user-friendly name

public static String

Returns:

The user-friendly name - if not one of the defined SSH_OPEN_ values then returns the string representation of the reason's value
getOpenErrorCodeName
(int
The open error value
code
)

Converts an open error value to a user-friendly name

public static boolean

Returns:

true if this value is used by several different messages
isAmbiguousOpcode
(int
The command value
cmd
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_PORTback to summary
public static final int DEFAULT_PORT
SSH2_DISCONNECT_AUTH_CANCELLED_BY_USERback to summary
public static final int SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER
SSH2_DISCONNECT_BY_APPLICATIONback to summary
public static final int SSH2_DISCONNECT_BY_APPLICATION
SSH2_DISCONNECT_COMPRESSION_ERRORback to summary
public static final int SSH2_DISCONNECT_COMPRESSION_ERROR
SSH2_DISCONNECT_CONNECTION_LOSTback to summary
public static final int SSH2_DISCONNECT_CONNECTION_LOST
SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILEDback to summary
public static final int SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILED
SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLEback to summary
public static final int SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE
SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECTback to summary
public static final int SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT
SSH2_DISCONNECT_ILLEGAL_USER_NAMEback to summary
public static final int SSH2_DISCONNECT_ILLEGAL_USER_NAME
SSH2_DISCONNECT_KEY_EXCHANGE_FAILEDback to summary
public static final int SSH2_DISCONNECT_KEY_EXCHANGE_FAILED
SSH2_DISCONNECT_MAC_ERRORback to summary
public static final int SSH2_DISCONNECT_MAC_ERROR
SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLEback to summary
public static final int SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE
SSH2_DISCONNECT_PROTOCOL_ERRORback to summary
public static final int SSH2_DISCONNECT_PROTOCOL_ERROR
SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTEDback to summary
public static final int SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED
SSH2_DISCONNECT_RESERVEDback to summary
public static final int SSH2_DISCONNECT_RESERVED
SSH2_DISCONNECT_SERVICE_NOT_AVAILABLEback to summary
public static final int SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE
SSH2_DISCONNECT_TOO_MANY_CONNECTIONSback to summary
public static final int SSH2_DISCONNECT_TOO_MANY_CONNECTIONS
SSH_EXTENDED_DATA_STDERRback to summary
public static final int SSH_EXTENDED_DATA_STDERR
SSH_MSG_CHANNEL_CLOSEback to summary
public static final byte SSH_MSG_CHANNEL_CLOSE
SSH_MSG_CHANNEL_DATAback to summary
public static final byte SSH_MSG_CHANNEL_DATA
SSH_MSG_CHANNEL_EOFback to summary
public static final byte SSH_MSG_CHANNEL_EOF
SSH_MSG_CHANNEL_EXTENDED_DATAback to summary
public static final byte SSH_MSG_CHANNEL_EXTENDED_DATA
SSH_MSG_CHANNEL_FAILUREback to summary
public static final byte SSH_MSG_CHANNEL_FAILURE
SSH_MSG_CHANNEL_OPENback to summary
public static final byte SSH_MSG_CHANNEL_OPEN
SSH_MSG_CHANNEL_OPEN_CONFIRMATIONback to summary
public static final byte SSH_MSG_CHANNEL_OPEN_CONFIRMATION
SSH_MSG_CHANNEL_OPEN_FAILUREback to summary
public static final byte SSH_MSG_CHANNEL_OPEN_FAILURE
SSH_MSG_CHANNEL_REQUESTback to summary
public static final byte SSH_MSG_CHANNEL_REQUEST
SSH_MSG_CHANNEL_SUCCESSback to summary
public static final byte SSH_MSG_CHANNEL_SUCCESS
SSH_MSG_CHANNEL_WINDOW_ADJUSTback to summary
public static final byte SSH_MSG_CHANNEL_WINDOW_ADJUST
SSH_MSG_DEBUGback to summary
public static final byte SSH_MSG_DEBUG
SSH_MSG_DISCONNECTback to summary
public static final byte SSH_MSG_DISCONNECT
SSH_MSG_GLOBAL_REQUESTback to summary
public static final byte SSH_MSG_GLOBAL_REQUEST
SSH_MSG_IGNOREback to summary
public static final byte SSH_MSG_IGNORE
SSH_MSG_KEX_DH_GEX_GROUPback to summary
public static final byte SSH_MSG_KEX_DH_GEX_GROUP
SSH_MSG_KEX_DH_GEX_INITback to summary
public static final byte SSH_MSG_KEX_DH_GEX_INIT
SSH_MSG_KEX_DH_GEX_REPLYback to summary
public static final byte SSH_MSG_KEX_DH_GEX_REPLY
SSH_MSG_KEX_DH_GEX_REQUESTback to summary
public static final byte SSH_MSG_KEX_DH_GEX_REQUEST
SSH_MSG_KEX_DH_GEX_REQUEST_OLDback to summary
public static final byte SSH_MSG_KEX_DH_GEX_REQUEST_OLD
SSH_MSG_KEX_FIRSTback to summary
public static final byte SSH_MSG_KEX_FIRST
SSH_MSG_KEX_LASTback to summary
public static final byte SSH_MSG_KEX_LAST
SSH_MSG_KEXDH_INITback to summary
public static final byte SSH_MSG_KEXDH_INIT
SSH_MSG_KEXDH_REPLYback to summary
public static final byte SSH_MSG_KEXDH_REPLY
SSH_MSG_KEXINITback to summary
public static final byte SSH_MSG_KEXINIT
SSH_MSG_NEWKEYSback to summary
public static final byte SSH_MSG_NEWKEYS
SSH_MSG_REQUEST_FAILUREback to summary
public static final byte SSH_MSG_REQUEST_FAILURE
SSH_MSG_REQUEST_SUCCESSback to summary
public static final byte SSH_MSG_REQUEST_SUCCESS
SSH_MSG_SERVICE_ACCEPTback to summary
public static final byte SSH_MSG_SERVICE_ACCEPT
SSH_MSG_SERVICE_REQUESTback to summary
public static final byte SSH_MSG_SERVICE_REQUEST
SSH_MSG_UNIMPLEMENTEDback to summary
public static final byte SSH_MSG_UNIMPLEMENTED
SSH_MSG_USERAUTH_BANNERback to summary
public static final byte SSH_MSG_USERAUTH_BANNER
SSH_MSG_USERAUTH_FAILUREback to summary
public static final byte SSH_MSG_USERAUTH_FAILURE
SSH_MSG_USERAUTH_GSSAPI_MICback to summary
public static final byte SSH_MSG_USERAUTH_GSSAPI_MIC
SSH_MSG_USERAUTH_INFO_REQUESTback to summary
public static final byte SSH_MSG_USERAUTH_INFO_REQUEST
SSH_MSG_USERAUTH_INFO_RESPONSEback to summary
public static final byte SSH_MSG_USERAUTH_INFO_RESPONSE
SSH_MSG_USERAUTH_PASSWD_CHANGEREQback to summary
public static final byte SSH_MSG_USERAUTH_PASSWD_CHANGEREQ
SSH_MSG_USERAUTH_PK_OKback to summary
public static final byte SSH_MSG_USERAUTH_PK_OK
SSH_MSG_USERAUTH_REQUESTback to summary
public static final byte SSH_MSG_USERAUTH_REQUEST
SSH_MSG_USERAUTH_SUCCESSback to summary
public static final byte SSH_MSG_USERAUTH_SUCCESS
SSH_OPEN_ADMINISTRATIVELY_PROHIBITEDback to summary
public static final int SSH_OPEN_ADMINISTRATIVELY_PROHIBITED
SSH_OPEN_CONNECT_FAILEDback to summary
public static final int SSH_OPEN_CONNECT_FAILED
SSH_OPEN_RESOURCE_SHORTAGEback to summary
public static final int SSH_OPEN_RESOURCE_SHORTAGE
SSH_OPEN_UNKNOWN_CHANNEL_TYPEback to summary
public static final int SSH_OPEN_UNKNOWN_CHANNEL_TYPE
SSH_PACKET_HEADER_LENback to summary
public static final int SSH_PACKET_HEADER_LEN
SSH_REQUIRED_PAYLOAD_PACKET_LENGTH_SUPPORTback to summary
public static final int SSH_REQUIRED_PAYLOAD_PACKET_LENGTH_SUPPORT
SSH_REQUIRED_TOTAL_PACKET_LENGTH_SUPPORTback to summary
public static final int SSH_REQUIRED_TOTAL_PACKET_LENGTH_SUPPORT
TO_EFFECTIVE_PORTback to summary
public static final IntUnaryOperator TO_EFFECTIVE_PORT

Converts non-positive port value to 22

Constructor Detail

SshConstantsback to summary
private SshConstants()

Method Detail

getAmbiguousOpcodesback to summary
public static Set<Integer> getAmbiguousOpcodes()
Returns:Set<Integer>

A Set of opcodes that are used by several different messages

Annotations
@SuppressWarnings:synthetic-access
getCommandMessageNameback to summary
public static String getCommandMessageName(int cmd)

Converts a command value to a user-friendly name

Parameters
cmd:int

The command value

Returns:String

The user-friendly name - if not one of the defined SSH_MSG_XXX values then returns the string representation of the command's value

getDisconnectReasonNameback to summary
public static String getDisconnectReasonName(int reason)

Converts a disconnect reason value to a user-friendly name

Parameters
reason:int

The disconnect reason value

Returns:String

The user-friendly name - if not one of the defined SSH2_DISCONNECT_ values then returns the string representation of the reason's value

getOpenErrorCodeNameback to summary
public static String getOpenErrorCodeName(int code)

Converts an open error value to a user-friendly name

Parameters
code:int

The open error value

Returns:String

The user-friendly name - if not one of the defined SSH_OPEN_ values then returns the string representation of the reason's value

isAmbiguousOpcodeback to summary
public static boolean isAmbiguousOpcode(int cmd)
Parameters
cmd:int

The command value

Returns:boolean

true if this value is used by several different messages

See Also
getAmbiguousOpcodes()
org.apache.sshd.common back to summary

private final Class SshConstants.LazyAmbiguousOpcodesHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Set<Integer>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AMBIGUOUS_OPCODESback to summary
private static final Set<Integer> AMBIGUOUS_OPCODES

Constructor Detail

LazyAmbiguousOpcodesHolderback to summary
private LazyAmbiguousOpcodesHolder()
org.apache.sshd.common back to summary

private final Class SshConstants.LazyMessagesMapHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Map<Integer, String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MESSAGES_MAPback to summary
private static final Map<Integer, String> MESSAGES_MAP

Constructor Detail

LazyMessagesMapHolderback to summary
private LazyMessagesMapHolder()
org.apache.sshd.common back to summary

private final Class SshConstants.LazyOpenCodesMapHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Map<Integer, String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

OPEN_CODES_MAPback to summary
private static final Map<Integer, String> OPEN_CODES_MAP

Constructor Detail

LazyOpenCodesMapHolderback to summary
private LazyOpenCodesMapHolder()
org.apache.sshd.common back to summary

private final Class SshConstants.LazyReasonsMapHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Map<Integer, String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

REASONS_MAPback to summary
private static final Map<Integer, String> REASONS_MAP

Constructor Detail

LazyReasonsMapHolderback to summary
private LazyReasonsMapHolder()