com.mindbright.ssh2
public interface SSH2TransportEventHandler
SSH2Transport
to get info on the progress and status of the ssh2
connection. It is also used to authenticate the host running the ssh2 server
(e.g. through comparing its public key to a known key or verifying its
certificate).SSH2Transport
,
SSH2TransportEventAdapter
Modifier and Type | Method and Description |
---|---|
void |
fatalDisconnect(SSH2Transport tp,
int reason,
java.lang.String description,
java.lang.String languageTag)
Called when transport layer is disconnected for the given fatal reason by
our side of the connection.
|
void |
gotConnectInfoText(SSH2Transport tp,
java.lang.String text)
Called when an info text is received in the version negotiation stage (as
defined in the transport protocol spec.).
|
void |
gotPeerVersion(SSH2Transport tp,
java.lang.String versionString,
int major,
int minor,
java.lang.String packageVersion)
Called in the version negotiation stage when the peer version is received
(as defined in the transport protocol spec.).
|
void |
kexAgreed(SSH2Transport tp,
SSH2Preferences ourPrefs,
SSH2Preferences peerPrefs)
Called when key exchange have agreed on algorithms.
|
boolean |
kexAuthenticateHost(SSH2Transport tp,
SSH2Signature serverHostKey)
Called to authenticate server's host key.
|
void |
kexComplete(SSH2Transport tp)
Called when key exchange has been successfully completed.
|
void |
kexStart(SSH2Transport tp)
Called when key exchange starts.
|
void |
msgDebug(SSH2Transport tp,
boolean alwaysDisplay,
java.lang.String message,
java.lang.String languageTag)
Called when a DEBUG message is received.
|
void |
msgIgnore(SSH2Transport tp,
byte[] data)
Called when an IGNORE message is received.
|
void |
msgUnimplemented(SSH2Transport tp,
int rejectedSeqNum)
Called when an UNIMPLEMENTED message is received.
|
void |
normalDisconnect(SSH2Transport tp,
java.lang.String description,
java.lang.String languageTag)
Called when transport layer is disconnected gracefully by our side of
connection.
|
void |
peerDisconnect(SSH2Transport tp,
int reason,
java.lang.String description,
java.lang.String languageTag)
Called when peer disconnects the transport layer for some given
reason.
|
void |
peerSentUnknownMessage(SSH2Transport tp,
int pktType)
Called when an unimplemented message is received, and an UNIMPLEMENTED
message is sent to peer.
|
void gotConnectInfoText(SSH2Transport tp, java.lang.String text)
tp
- the transport layertext
- the info text receivedvoid gotPeerVersion(SSH2Transport tp, java.lang.String versionString, int major, int minor, java.lang.String packageVersion)
tp
- the transport layerversionString
- the version string of peermajor
- the major protocol version of peerminor
- the minor protocol version of peerpackageVersion
- the package version of peervoid kexStart(SSH2Transport tp)
tp
- the transport layervoid kexAgreed(SSH2Transport tp, SSH2Preferences ourPrefs, SSH2Preferences peerPrefs)
tp
- the transport layerourPrefs
- our preferencespeerPrefs
- peer's preferencesboolean kexAuthenticateHost(SSH2Transport tp, SSH2Signature serverHostKey)
tp
- the transport layerserverHostKey
- server's host keyvoid kexComplete(SSH2Transport tp)
tp
- the transport layervoid msgDebug(SSH2Transport tp, boolean alwaysDisplay, java.lang.String message, java.lang.String languageTag)
tp
- the transport layeralwaysDisplay
- boolean flag indicating whether this message should
always be displayed or not.message
- debug message contained in the packetlanguageTag
- language tagvoid msgIgnore(SSH2Transport tp, byte[] data)
tp
- the transport layerdata
- byte array of data contained in packetvoid msgUnimplemented(SSH2Transport tp, int rejectedSeqNum)
tp
- the transport layerrejectedSeqNum
- sequence number of packet which peer didn't
understnadvoid peerSentUnknownMessage(SSH2Transport tp, int pktType)
tp
- the transport layerpktType
- type of message which we didn't understandvoid normalDisconnect(SSH2Transport tp, java.lang.String description, java.lang.String languageTag)
tp
- the transport layerdescription
- textual description for reason of disconnectlanguageTag
- language tagvoid fatalDisconnect(SSH2Transport tp, int reason, java.lang.String description, java.lang.String languageTag)
SSH2
for reason
codes.tp
- the transport layerreason
- the reason codedescription
- textual description for reason of disconnectlanguageTag
- language tagSSH2
void peerDisconnect(SSH2Transport tp, int reason, java.lang.String description, java.lang.String languageTag)
SSH2
for reason codes.tp
- the transport layerreason
- the reason codedescription
- textual description for reason of disconnectlanguageTag
- language tagSSH2