| net.schmizz.sshj.transport.Transport |
Known Indirect Subclasses
|
Transport layer of the SSH protocol.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds the specified verifier.
| |||||||||||
Send a disconnect packet with the given
reason and message, and closes this
transport. | |||||||||||
Send a disconnection packet with reason as
BY_APPLICATION, and closes this transport. | |||||||||||
Send a disconnect packet with the given
reason, and closes this transport. | |||||||||||
Do key exchange and algorithm negotiation.
| |||||||||||
Returns the version string as sent by the SSH server for identification purposes, e.g.
| |||||||||||
Sets the host information and the streams to be used by this transport.
| |||||||||||
Joins the thread calling this method to the transport's death.
| |||||||||||
Joins the thread calling this method to the transport's death.
| |||||||||||
Request a SSH service represented by a
Service instance. | |||||||||||
Sends SSH_MSG_UNIMPLEMENTED in response to the last packet received.
| |||||||||||
Informs this transport that authentication has been completed.
| |||||||||||
Specify a
listener that will be notified upon disconnection. | |||||||||||
Sets the currently active
Service. | |||||||||||
Set a timeout for methods that may block.
| |||||||||||
Write a packet over this transport.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
net.schmizz.sshj.common.SSHPacketHandler
| |||||||||||
Adds the specified verifier.
| hkv | The host key verifier |
|---|
Send a disconnect packet with the given reason and message, and closes this
transport.
| reason | The reason code for this disconnect |
|---|---|
| message | The text message |
Send a disconnection packet with reason as BY_APPLICATION, and closes this transport.
Send a disconnect packet with the given reason, and closes this transport.
| reason | Reason for disconnecting |
|---|
Do key exchange and algorithm negotiation. This can be the initial one or for algorithm renegotiation.
| TransportException | if there was an error during key exchange |
|---|
Returns the version string as sent by the SSH server for identification purposes, e.g. "OpenSSH_$version".
If the transport has not yet been initialized viainit(String, int, InputStream, OutputStream), it will be null.null)
Sets the host information and the streams to be used by this transport. Identification information is exchanged
with the server. A TransportException is thrown in case of SSH protocol version incompatibility.
| host | Server's hostname |
|---|---|
| port | Server's port |
| in | Input stream for the connection |
| out | Output stream for the connection |
| TransportException | if there is an error during exchange of identification information |
|---|
init(String, int, InputStream, OutputStream) and
has not been disconnected.
Joins the thread calling this method to the transport's death.
| timeout | |
|---|---|
| unit |
| TransportException | if the transport dies of an exception |
|---|
Joins the thread calling this method to the transport's death.
| TransportException | if the transport dies of an exception |
|---|
Request a SSH service represented by a Service instance. A separate call to setService(Service) is not
needed.
| service | The SSH service to be requested |
|---|
| TransportException | if the request failed for any reason |
|---|
Sends SSH_MSG_UNIMPLEMENTED in response to the last packet received.
| TransportException | if an error occured sending the packet |
|---|
Informs this transport that authentication has been completed. This method must be called after successful authentication, so that delayed compression may become effective if applicable.
Specify a listener that will be notified upon disconnection.
| listener |
|---|
| interval | The interval in seconds, 0 means no hearbeat |
|---|
Sets the currently active Service. Handling of non-transport-layer packets is delegated to that service.
reqService(Service) must have been successful
(not necessarily for the service being set).| service | (null-ok) the Service
|
|---|
Set a timeout for methods that may block.
| timeout | The timeout in seconds |
|---|
Write a packet over this transport.
Thepayload SSHPacket should have 5 bytes free at the beginning to avoid a performance penalty
associated with making space for header bytes (packet length, padding length).| payload | The SSHPacket containing data to send |
|---|
| TransportException | if an error occurred sending the packet |
|---|