|
Sending data |
|
To send data you may use the SshSession#send, SshSession#sendWait, or SshSession#sendNoWait method. The functionality and differences of these are described below.
Method |
Description |
SshSession#send |
Sends command and waits for the session shell prompt to return.
Returns a string containing all data received from SSH server between the time the command was issued and the session shell prompt was received. |
SshSession#sendWait |
Sends command and waits for the specified prompt to return. This prompt may differ from the current session shell prompt.
Returns a string containing all data received from SSH server between the time the command was issued and the specified prompt was received. |
SshSession#sendNoWait |
Sends command and immediately returns. This is useful in cases where you want to send an "exit" or "logout" command and no shell prompt is expected to return. |