Package org.apache.sshd.common
Class SshConstants
- java.lang.Object
-
- org.apache.sshd.common.SshConstants
-
public final class SshConstants extends java.lang.Object
This interface defines constants for the SSH protocol.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SshConstants.LazyAmbiguousOpcodesHolder
private static class
SshConstants.LazyMessagesMapHolder
private static class
SshConstants.LazyOpenCodesMapHolder
private static class
SshConstants.LazyReasonsMapHolder
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description private
SshConstants()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<java.lang.Integer>
getAmbiguousOpcodes()
static java.lang.String
getCommandMessageName(int cmd)
Converts a command value to a user-friendly namestatic java.lang.String
getDisconnectReasonName(int reason)
Converts a disconnect reason value to a user-friendly namestatic java.lang.String
getOpenErrorCodeName(int code)
Converts an open error value to a user-friendly namestatic boolean
isAmbiguousOpcode(int cmd)
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
SSH_MSG_DISCONNECT
public static final byte SSH_MSG_DISCONNECT
- See Also:
- Constant Field Values
-
SSH_MSG_IGNORE
public static final byte SSH_MSG_IGNORE
- See Also:
- Constant Field Values
-
SSH_MSG_UNIMPLEMENTED
public static final byte SSH_MSG_UNIMPLEMENTED
- See Also:
- Constant Field Values
-
SSH_MSG_DEBUG
public static final byte SSH_MSG_DEBUG
- See Also:
- Constant Field Values
-
SSH_MSG_SERVICE_REQUEST
public static final byte SSH_MSG_SERVICE_REQUEST
- See Also:
- Constant Field Values
-
SSH_MSG_SERVICE_ACCEPT
public static final byte SSH_MSG_SERVICE_ACCEPT
- See Also:
- Constant Field Values
-
SSH_MSG_KEXINIT
public static final byte SSH_MSG_KEXINIT
- See Also:
- Constant Field Values
-
MSG_KEX_COOKIE_SIZE
public static final int MSG_KEX_COOKIE_SIZE
- See Also:
- Constant Field Values
-
SSH_MSG_NEWKEYS
public static final byte SSH_MSG_NEWKEYS
- See Also:
- Constant Field Values
-
SSH_MSG_KEX_FIRST
public static final byte SSH_MSG_KEX_FIRST
- See Also:
- Constant Field Values
-
SSH_MSG_KEX_LAST
public static final byte SSH_MSG_KEX_LAST
- See Also:
- Constant Field Values
-
SSH_MSG_KEXDH_INIT
public static final byte SSH_MSG_KEXDH_INIT
- See Also:
- Constant Field Values
-
SSH_MSG_KEXDH_REPLY
public static final byte SSH_MSG_KEXDH_REPLY
- See Also:
- Constant Field Values
-
SSH_MSG_KEX_DH_GEX_REQUEST_OLD
public static final byte SSH_MSG_KEX_DH_GEX_REQUEST_OLD
- See Also:
- Constant Field Values
-
SSH_MSG_KEX_DH_GEX_GROUP
public static final byte SSH_MSG_KEX_DH_GEX_GROUP
- See Also:
- Constant Field Values
-
SSH_MSG_KEX_DH_GEX_INIT
public static final byte SSH_MSG_KEX_DH_GEX_INIT
- See Also:
- Constant Field Values
-
SSH_MSG_KEX_DH_GEX_REPLY
public static final byte SSH_MSG_KEX_DH_GEX_REPLY
- See Also:
- Constant Field Values
-
SSH_MSG_KEX_DH_GEX_REQUEST
public static final byte SSH_MSG_KEX_DH_GEX_REQUEST
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_REQUEST
public static final byte SSH_MSG_USERAUTH_REQUEST
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_FAILURE
public static final byte SSH_MSG_USERAUTH_FAILURE
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_SUCCESS
public static final byte SSH_MSG_USERAUTH_SUCCESS
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_BANNER
public static final byte SSH_MSG_USERAUTH_BANNER
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_INFO_REQUEST
public static final byte SSH_MSG_USERAUTH_INFO_REQUEST
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_INFO_RESPONSE
public static final byte SSH_MSG_USERAUTH_INFO_RESPONSE
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_PK_OK
public static final byte SSH_MSG_USERAUTH_PK_OK
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_PASSWD_CHANGEREQ
public static final byte SSH_MSG_USERAUTH_PASSWD_CHANGEREQ
- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_GSSAPI_MIC
public static final byte SSH_MSG_USERAUTH_GSSAPI_MIC
- See Also:
- Constant Field Values
-
SSH_MSG_GLOBAL_REQUEST
public static final byte SSH_MSG_GLOBAL_REQUEST
- See Also:
- Constant Field Values
-
SSH_MSG_REQUEST_SUCCESS
public static final byte SSH_MSG_REQUEST_SUCCESS
- See Also:
- Constant Field Values
-
SSH_MSG_REQUEST_FAILURE
public static final byte SSH_MSG_REQUEST_FAILURE
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_OPEN
public static final byte SSH_MSG_CHANNEL_OPEN
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_OPEN_CONFIRMATION
public static final byte SSH_MSG_CHANNEL_OPEN_CONFIRMATION
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_OPEN_FAILURE
public static final byte SSH_MSG_CHANNEL_OPEN_FAILURE
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_WINDOW_ADJUST
public static final byte SSH_MSG_CHANNEL_WINDOW_ADJUST
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_DATA
public static final byte SSH_MSG_CHANNEL_DATA
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_EXTENDED_DATA
public static final byte SSH_MSG_CHANNEL_EXTENDED_DATA
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_EOF
public static final byte SSH_MSG_CHANNEL_EOF
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_CLOSE
public static final byte SSH_MSG_CHANNEL_CLOSE
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_REQUEST
public static final byte SSH_MSG_CHANNEL_REQUEST
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_SUCCESS
public static final byte SSH_MSG_CHANNEL_SUCCESS
- See Also:
- Constant Field Values
-
SSH_MSG_CHANNEL_FAILURE
public static final byte SSH_MSG_CHANNEL_FAILURE
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT
public static final int SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_PROTOCOL_ERROR
public static final int SSH2_DISCONNECT_PROTOCOL_ERROR
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_KEY_EXCHANGE_FAILED
public static final int SSH2_DISCONNECT_KEY_EXCHANGE_FAILED
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILED
public static final int SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILED
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_RESERVED
public static final int SSH2_DISCONNECT_RESERVED
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_MAC_ERROR
public static final int SSH2_DISCONNECT_MAC_ERROR
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_COMPRESSION_ERROR
public static final int SSH2_DISCONNECT_COMPRESSION_ERROR
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE
public static final int SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED
public static final int SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE
public static final int SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_CONNECTION_LOST
public static final int SSH2_DISCONNECT_CONNECTION_LOST
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_BY_APPLICATION
public static final int SSH2_DISCONNECT_BY_APPLICATION
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_TOO_MANY_CONNECTIONS
public static final int SSH2_DISCONNECT_TOO_MANY_CONNECTIONS
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER
public static final int SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE
public static final int SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE
- See Also:
- Constant Field Values
-
SSH2_DISCONNECT_ILLEGAL_USER_NAME
public static final int SSH2_DISCONNECT_ILLEGAL_USER_NAME
- See Also:
- Constant Field Values
-
SSH_OPEN_ADMINISTRATIVELY_PROHIBITED
public static final int SSH_OPEN_ADMINISTRATIVELY_PROHIBITED
- See Also:
- Constant Field Values
-
SSH_OPEN_CONNECT_FAILED
public static final int SSH_OPEN_CONNECT_FAILED
- See Also:
- Constant Field Values
-
SSH_OPEN_UNKNOWN_CHANNEL_TYPE
public static final int SSH_OPEN_UNKNOWN_CHANNEL_TYPE
- See Also:
- Constant Field Values
-
SSH_OPEN_RESOURCE_SHORTAGE
public static final int SSH_OPEN_RESOURCE_SHORTAGE
- See Also:
- Constant Field Values
-
SSH_EXTENDED_DATA_STDERR
public static final int SSH_EXTENDED_DATA_STDERR
- See Also:
- Constant Field Values
-
SSH_PACKET_HEADER_LEN
public static final int SSH_PACKET_HEADER_LEN
- See Also:
- Constant Field Values
-
SSH_REQUIRED_PAYLOAD_PACKET_LENGTH_SUPPORT
public static final int SSH_REQUIRED_PAYLOAD_PACKET_LENGTH_SUPPORT
- See Also:
- Constant Field Values
-
SSH_REQUIRED_TOTAL_PACKET_LENGTH_SUPPORT
public static final int SSH_REQUIRED_TOTAL_PACKET_LENGTH_SUPPORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
isAmbiguousOpcode
public static boolean isAmbiguousOpcode(int cmd)
- Parameters:
cmd
- The command value- Returns:
true
if this value is used by several different messages- See Also:
getAmbiguousOpcodes()
-
getAmbiguousOpcodes
public static java.util.Set<java.lang.Integer> getAmbiguousOpcodes()
- Returns:
- A
Set
of opcodes that are used by several different messages
-
getCommandMessageName
public static java.lang.String getCommandMessageName(int cmd)
Converts a command value to a user-friendly name- Parameters:
cmd
- The command value- 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
-
getDisconnectReasonName
public static java.lang.String getDisconnectReasonName(int reason)
Converts a disconnect reason value to a user-friendly name- Parameters:
reason
- The disconnect reason value- Returns:
- The user-friendly name - if not one of the defined
SSH2_DISCONNECT_
values then returns the string representation of the reason's value
-
getOpenErrorCodeName
public static java.lang.String getOpenErrorCodeName(int code)
Converts an open error value to a user-friendly name- Parameters:
code
- The open error value- Returns:
- The user-friendly name - if not one of the defined
SSH_OPEN_
values then returns the string representation of the reason's value
-
-