com.mindbright.ssh
Class SSH
java.lang.Object
com.mindbright.ssh.SSH
- Direct Known Subclasses:
- SSHChannelController, SSHClient, SSHServer
- public abstract class SSH
- extends java.lang.Object
Constructor Summary |
SSH()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
public static boolean DEBUG
DEBUGMORE
public static boolean DEBUGMORE
SSH_VER_MAJOR
public static final int SSH_VER_MAJOR
- See Also:
- Constant Field Values
SSH_VER_MINOR
public static final int SSH_VER_MINOR
- See Also:
- Constant Field Values
VER_MINDTERM
public static final java.lang.String VER_MINDTERM
VER_MINDTUNL
public static final java.lang.String VER_MINDTUNL
CVS_NAME
public static final java.lang.String CVS_NAME
- See Also:
- Constant Field Values
CVS_DATE
public static final java.lang.String CVS_DATE
- See Also:
- Constant Field Values
DEFAULTPORT
public static final int DEFAULTPORT
- See Also:
- Constant Field Values
SESSION_KEY_LENGTH
public static final int SESSION_KEY_LENGTH
- See Also:
- Constant Field Values
SERVER_KEY_LENGTH
public static final int SERVER_KEY_LENGTH
- See Also:
- Constant Field Values
HOST_KEY_LENGTH
public static final int HOST_KEY_LENGTH
- See Also:
- Constant Field Values
PROTOFLAG_SCREEN_NUMBER
public static final int PROTOFLAG_SCREEN_NUMBER
- See Also:
- Constant Field Values
PROTOFLAG_HOST_IN_FWD_OPEN
public static final int PROTOFLAG_HOST_IN_FWD_OPEN
- See Also:
- Constant Field Values
MSG_ANY
public static final int MSG_ANY
- See Also:
- Constant Field Values
MSG_NONE
public static final int MSG_NONE
- See Also:
- Constant Field Values
MSG_DISCONNECT
public static final int MSG_DISCONNECT
- See Also:
- Constant Field Values
SMSG_PUBLIC_KEY
public static final int SMSG_PUBLIC_KEY
- See Also:
- Constant Field Values
CMSG_SESSION_KEY
public static final int CMSG_SESSION_KEY
- See Also:
- Constant Field Values
CMSG_USER
public static final int CMSG_USER
- See Also:
- Constant Field Values
CMSG_AUTH_RHOSTS
public static final int CMSG_AUTH_RHOSTS
- See Also:
- Constant Field Values
CMSG_AUTH_RSA
public static final int CMSG_AUTH_RSA
- See Also:
- Constant Field Values
SMSG_AUTH_RSA_CHALLENGE
public static final int SMSG_AUTH_RSA_CHALLENGE
- See Also:
- Constant Field Values
CMSG_AUTH_RSA_RESPONSE
public static final int CMSG_AUTH_RSA_RESPONSE
- See Also:
- Constant Field Values
CMSG_AUTH_PASSWORD
public static final int CMSG_AUTH_PASSWORD
- See Also:
- Constant Field Values
CMSG_REQUEST_PTY
public static final int CMSG_REQUEST_PTY
- See Also:
- Constant Field Values
CMSG_WINDOW_SIZE
public static final int CMSG_WINDOW_SIZE
- See Also:
- Constant Field Values
CMSG_EXEC_SHELL
public static final int CMSG_EXEC_SHELL
- See Also:
- Constant Field Values
CMSG_EXEC_CMD
public static final int CMSG_EXEC_CMD
- See Also:
- Constant Field Values
SMSG_SUCCESS
public static final int SMSG_SUCCESS
- See Also:
- Constant Field Values
SMSG_FAILURE
public static final int SMSG_FAILURE
- See Also:
- Constant Field Values
CMSG_STDIN_DATA
public static final int CMSG_STDIN_DATA
- See Also:
- Constant Field Values
SMSG_STDOUT_DATA
public static final int SMSG_STDOUT_DATA
- See Also:
- Constant Field Values
SMSG_STDERR_DATA
public static final int SMSG_STDERR_DATA
- See Also:
- Constant Field Values
CMSG_EOF
public static final int CMSG_EOF
- See Also:
- Constant Field Values
SMSG_EXITSTATUS
public static final int SMSG_EXITSTATUS
- See Also:
- Constant Field Values
MSG_CHANNEL_OPEN_CONFIRMATION
public static final int MSG_CHANNEL_OPEN_CONFIRMATION
- See Also:
- Constant Field Values
MSG_CHANNEL_OPEN_FAILURE
public static final int MSG_CHANNEL_OPEN_FAILURE
- See Also:
- Constant Field Values
MSG_CHANNEL_DATA
public static final int MSG_CHANNEL_DATA
- See Also:
- Constant Field Values
MSG_CHANNEL_CLOSE
public static final int MSG_CHANNEL_CLOSE
- See Also:
- Constant Field Values
MSG_CHANNEL_CLOSE_CONFIRMATION
public static final int MSG_CHANNEL_CLOSE_CONFIRMATION
- See Also:
- Constant Field Values
MSG_CHANNEL_INPUT_EOF
public static final int MSG_CHANNEL_INPUT_EOF
- See Also:
- Constant Field Values
MSG_CHANNEL_OUTPUT_CLOSED
public static final int MSG_CHANNEL_OUTPUT_CLOSED
- See Also:
- Constant Field Values
SMSG_X11_OPEN
public static final int SMSG_X11_OPEN
- See Also:
- Constant Field Values
CMSG_PORT_FORWARD_REQUEST
public static final int CMSG_PORT_FORWARD_REQUEST
- See Also:
- Constant Field Values
MSG_PORT_OPEN
public static final int MSG_PORT_OPEN
- See Also:
- Constant Field Values
CMSG_AGENT_REQUEST_FORWARDING
public static final int CMSG_AGENT_REQUEST_FORWARDING
- See Also:
- Constant Field Values
SMSG_AGENT_OPEN
public static final int SMSG_AGENT_OPEN
- See Also:
- Constant Field Values
MSG_IGNORE
public static final int MSG_IGNORE
- See Also:
- Constant Field Values
CMSG_EXIT_CONFIRMATION
public static final int CMSG_EXIT_CONFIRMATION
- See Also:
- Constant Field Values
CMSG_X11_REQUEST_FORWARDING
public static final int CMSG_X11_REQUEST_FORWARDING
- See Also:
- Constant Field Values
CMSG_AUTH_RHOSTS_RSA
public static final int CMSG_AUTH_RHOSTS_RSA
- See Also:
- Constant Field Values
MSG_DEBUG
public static final int MSG_DEBUG
- See Also:
- Constant Field Values
CMSG_REQUEST_COMPRESSION
public static final int CMSG_REQUEST_COMPRESSION
- See Also:
- Constant Field Values
CMSG_MAX_PACKET_SIZE
public static final int CMSG_MAX_PACKET_SIZE
- See Also:
- Constant Field Values
CMSG_AUTH_TIS
public static final int CMSG_AUTH_TIS
- See Also:
- Constant Field Values
SMSG_AUTH_TIS_CHALLENGE
public static final int SMSG_AUTH_TIS_CHALLENGE
- See Also:
- Constant Field Values
CMSG_AUTH_TIS_RESPONSE
public static final int CMSG_AUTH_TIS_RESPONSE
- See Also:
- Constant Field Values
CMSG_AUTH_SDI
public static final int CMSG_AUTH_SDI
- See Also:
- Constant Field Values
CMSG_ACM_OK
public static final int CMSG_ACM_OK
- See Also:
- Constant Field Values
CMSG_ACM_ACCESS_DENIED
public static final int CMSG_ACM_ACCESS_DENIED
- See Also:
- Constant Field Values
CMSG_ACM_NEXT_CODE_REQUIRED
public static final int CMSG_ACM_NEXT_CODE_REQUIRED
- See Also:
- Constant Field Values
CMSG_ACM_NEXT_CODE
public static final int CMSG_ACM_NEXT_CODE
- See Also:
- Constant Field Values
CMSG_ACM_NEW_PIN_REQUIRED
public static final int CMSG_ACM_NEW_PIN_REQUIRED
- See Also:
- Constant Field Values
CMSG_ACM_NEW_PIN_ACCEPTED
public static final int CMSG_ACM_NEW_PIN_ACCEPTED
- See Also:
- Constant Field Values
CMSG_ACM_NEW_PIN_REJECTED
public static final int CMSG_ACM_NEW_PIN_REJECTED
- See Also:
- Constant Field Values
CMSG_ACM_NEW_PIN
public static final int CMSG_ACM_NEW_PIN
- See Also:
- Constant Field Values
IDX_CIPHER_CLASS
public static final int IDX_CIPHER_CLASS
- See Also:
- Constant Field Values
IDX_CIPHER_NAME
public static final int IDX_CIPHER_NAME
- See Also:
- Constant Field Values
cipherClasses
public static final java.lang.String[][] cipherClasses
CIPHER_NONE
public static final int CIPHER_NONE
- See Also:
- Constant Field Values
CIPHER_IDEA
public static final int CIPHER_IDEA
- See Also:
- Constant Field Values
CIPHER_DES
public static final int CIPHER_DES
- See Also:
- Constant Field Values
CIPHER_3DES
public static final int CIPHER_3DES
- See Also:
- Constant Field Values
CIPHER_TSS
public static final int CIPHER_TSS
- See Also:
- Constant Field Values
CIPHER_RC4
public static final int CIPHER_RC4
- See Also:
- Constant Field Values
CIPHER_BLOWFISH
public static final int CIPHER_BLOWFISH
- See Also:
- Constant Field Values
CIPHER_RESERVED
public static final int CIPHER_RESERVED
- See Also:
- Constant Field Values
CIPHER_NOTSUPPORTED
public static final int CIPHER_NOTSUPPORTED
- See Also:
- Constant Field Values
CIPHER_DEFAULT
public static final int CIPHER_DEFAULT
- See Also:
- Constant Field Values
authTypeDesc
public static final java.lang.String[] authTypeDesc
AUTH_RHOSTS
public static final int AUTH_RHOSTS
- See Also:
- Constant Field Values
AUTH_PUBLICKEY
public static final int AUTH_PUBLICKEY
- See Also:
- Constant Field Values
AUTH_PASSWORD
public static final int AUTH_PASSWORD
- See Also:
- Constant Field Values
AUTH_RHOSTS_RSA
public static final int AUTH_RHOSTS_RSA
- See Also:
- Constant Field Values
AUTH_TIS
public static final int AUTH_TIS
- See Also:
- Constant Field Values
AUTH_KERBEROS
public static final int AUTH_KERBEROS
- See Also:
- Constant Field Values
PASS_KERBEROS_TGT
public static final int PASS_KERBEROS_TGT
- See Also:
- Constant Field Values
AUTH_SDI
public static final int AUTH_SDI
- See Also:
- Constant Field Values
AUTH_CRYPTOCARD
public static final int AUTH_CRYPTOCARD
- See Also:
- Constant Field Values
AUTH_KBDINTERACT
public static final int AUTH_KBDINTERACT
- See Also:
- Constant Field Values
AUTH_HOSTBASED
public static final int AUTH_HOSTBASED
- See Also:
- Constant Field Values
AUTH_NOTSUPPORTED
public static final int AUTH_NOTSUPPORTED
AUTH_DEFAULT
public static final int AUTH_DEFAULT
- See Also:
- Constant Field Values
PROXY_NONE
public static final int PROXY_NONE
- See Also:
- Constant Field Values
PROXY_HTTP
public static final int PROXY_HTTP
- See Also:
- Constant Field Values
PROXY_SOCKS4
public static final int PROXY_SOCKS4
- See Also:
- Constant Field Values
PROXY_SOCKS5_DNS
public static final int PROXY_SOCKS5_DNS
- See Also:
- Constant Field Values
PROXY_SOCKS5_IP
public static final int PROXY_SOCKS5_IP
- See Also:
- Constant Field Values
PROXY_NOTSUPPORTED
public static final int PROXY_NOTSUPPORTED
TTY_OP_END
public static final int TTY_OP_END
- See Also:
- Constant Field Values
TTY_OP_ISPEED
public static final int TTY_OP_ISPEED
- See Also:
- Constant Field Values
TTY_OP_OSPEED
public static final int TTY_OP_OSPEED
- See Also:
- Constant Field Values
MAIN_CHAN_NUM
public static final int MAIN_CHAN_NUM
- See Also:
- Constant Field Values
CONNECT_CHAN_NUM
public static final int CONNECT_CHAN_NUM
- See Also:
- Constant Field Values
LISTEN_CHAN_NUM
public static final int LISTEN_CHAN_NUM
- See Also:
- Constant Field Values
UNKNOWN_CHAN_NUM
public static final int UNKNOWN_CHAN_NUM
- See Also:
- Constant Field Values
KNOWN_HOSTS_FILE
public static final java.lang.String KNOWN_HOSTS_FILE
- See Also:
- Constant Field Values
SRV_HOSTKEY_KNOWN
public static final int SRV_HOSTKEY_KNOWN
- See Also:
- Constant Field Values
SRV_HOSTKEY_NEW
public static final int SRV_HOSTKEY_NEW
- See Also:
- Constant Field Values
SRV_HOSTKEY_CHANGED
public static final int SRV_HOSTKEY_CHANGED
- See Also:
- Constant Field Values
secureRandom
public SecureRandomAndPad secureRandom
randomSeed
public RandomSeed randomSeed
sessionKey
protected byte[] sessionKey
sessionId
protected byte[] sessionId
sndCipher
protected SSHCipher sndCipher
rcvCipher
protected SSHCipher rcvCipher
sndComp
protected SSHCompressor sndComp
rcvComp
protected SSHCompressor rcvComp
cipherType
protected int cipherType
srvCookie
protected byte[] srvCookie
srvServerKey
protected RSAPublicKey srvServerKey
srvHostKey
protected RSAPublicKey srvHostKey
protocolFlags
protected int protocolFlags
supportedCiphers
protected int supportedCiphers
supportedAuthTypes
protected int supportedAuthTypes
isAnSSHClient
protected boolean isAnSSHClient
SSH
public SSH()
getVersionId
public java.lang.String getVersionId(boolean client)
getProxyTypes
public static java.lang.String[] getProxyTypes()
getProxyType
public static int getProxyType(java.lang.String typeName)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getCipherName
public static java.lang.String getCipherName(int cipherType)
getCipherType
public static int getCipherType(java.lang.String cipherName)
getAuthName
public static java.lang.String getAuthName(int authType)
getAltAuthName
public static java.lang.String getAltAuthName(int authType)
getAuthType
public static int getAuthType(java.lang.String authName)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getAuthTypes
public static int[] getAuthTypes(java.lang.String authList)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
isCipherSupported
protected boolean isCipherSupported(int cipherType)
isAuthTypeSupported
protected boolean isAuthTypeSupported(int authType)
isProtocolFlagSet
protected boolean isProtocolFlagSet(int protFlag)
haveSecureRandom
public boolean haveSecureRandom()
randomSeed
public RandomSeed randomSeed()
initSeedGenerator
public void initSeedGenerator()
secureRandom
public SecureRandomAndPad secureRandom()
log
public static void log(java.lang.String msg)
logExtra
public static void logExtra(java.lang.String msg)
logDebug
public static void logDebug(java.lang.String msg)
logIgnore
public static void logIgnore(SSHPduInputStream pdu)
initClientCipher
protected void initClientCipher()
throws java.io.IOException
- Throws:
java.io.IOException
initServerCipher
protected void initServerCipher()
throws java.io.IOException
- Throws:
java.io.IOException
initCipher
protected void initCipher(boolean server)
throws java.io.IOException
- Throws:
java.io.IOException