Channel Controls and VIs

Owning Palette: Toolkit

Requires: LIBSSH2

Represents a SSH channel. A SSH channel is a bidirectional communication connection between two computers. The SSH channel is created after a SSH session has been established and the user has been authenticated. Note, multiple channels can exist for a single SSH session.

Class ItemDescription
Type DefinitionsGroups related files into a folder
Change Receive Window SizeAdjusts the receive window size in bytes.
CreateCreates a new Channel object that represents a libssh2lv shared library Channel struct. This VI must be called, or executed, before using any other Channel-related VIs. This VI allocates memory within the libssh2lv shared library that must be explicitly deallocated, or freed, at the end of the application using the Destroy VI to avoid memory leaks or running Out-of-Memory (OOM) on a resource contrained system. A Channel object represents a bi-directional stream of communication with a remote SSH server.
DestroyDeallocates, or frees, the memory allocated for the libssh2lv shared library Channel struct represented by this Channel object. After this is called, the object can no longer be used in the application without causing a segmentation fault, i.e. crashing LabVIEW. This VI must be called to avoid leaking memory or running Out-of-Memory (OOM) on resource-constrained systems.
ExecuteCreates a single execution context for a SSH channel. To execute multiple commands, either this channel needs to be destroyed and new channel created, or a Shell channel should be used instead.
FlushForces the internal libssh2lv shared library write buffer to send all binary data to the remote SSH server within the SSH channel.
Read All StderrReads binary data from the STDERR stream of a SSH channel represented by this Channel object in chunks, or blocks, until the total read size is reached. This VI should be used if the Total Read Size is greater than 30KB because of a hard-coded per-read maximum of 30KB defined in the libssh2lv shared library.
Read AllReads binary data from a SSH channel represented by this Channel object in chunks, or blocks, until the total read size is reached. This VI should be used if the Total Read Size is greater than 30KB because of a hard-coded per-read maximum of 30KB set in the libssh2lv shared library.
Read End-of-FileDetermines if the remote SSH server is at the End-of-File (EOF).
Read Exit StatusGets the exit status code for an Exec-style channel.
Read StderrReads binary data from the remote SSH server's STDERR stream through the SSH channel represented by this Channel object. The Max Data Length must be greater than or equal to the expected data that is returned from the remote SSH server to avoid an error. Note, there is a hard-coded maximum of 30KB in the libssh2lv shared library. If the expected data is greater than 30KB, then this VI should be executed in a loop that accummlates the Data array size for each execution and stops when the total binary data size has been reached.
Read Window Read SizeGets the window read size in bytes (B).
Read Window Write SizeGets the window write size in bytes (B).
ReadReads binary data from the SSH channel represented by this Channel object. The Max Data Length must be greater than or equal to the expected data that is returned from the remote SSH server to avoid an error. However, there is a hard-coded maximum of 30KB in the libssh2lv shared library. If the expected binary data is greater than 30KB, then the Read All should be used.
Send DoneSends a signal to the remote SSH server that no more data will be sent. It is generally good practice to send this signal before destroying the SSh channel.
Send End-of-FileSends the End-of-File (EOF) signal to the remote SSH server indicating all of the bytes from a file has been sent.
Set Environment VariableSets the value for an environment variable for a Shell channel.
ShellCreates a Shell channel for bidirectional communication with a STDIN, STDOUT, and STDERR streams.
SubsystemCreates a Subsystem SSH channel.
Wait for DoneWaits for the remote SSH/SFTP server sends acknowledgement that no more data will be sent from the local machine to the server.
Wait for End-of-FileWaits until the End-of-File (EOF) is received from the remote SSH/SFTP server. This is always a blocking operation.
Write All StderrWrites binary data to the STDERR stream of the SSH channel represented by this Channel object until all of the data (bytes) are written. If the binary data is larger than 30KB, then the data is written in 30KB chunks, or blocks, until the Write Count equals the Data array size.
Write AllWrites binary data to the SSH channel represented by this Channel object until all of the data (bytes) are written. If the binary data is larger than 30KB, then the data is written in 30KB chunks, or blocks, until the Write Count equals the Data array size.
Write Ignore ModeSets the kind of ignore response for this channel.
Write ModeSets the type communication for this channel.
Write StderrWrites binary data to the STDERR stream of the SSH channel represented by this Channel object. Only the first 30KB of the binary data will be written to the remote SSH server's STDERR stream because of a hard-coded 30KB maximum data length in the libssh2lv shared library. If the binary data is larger than 30KB, then this VI should be used in a While loop where multiple writes of smaller chunks, or blocks, to the STDERR stream occur until all of the binary data has been written.
Write TerminalSets the kind of terminal to use with a Shell-style channel.
Write Terminal SizeSets the terminal size in pixels (px).
Write X11Selects the screen on the remote SSH server to use when X11 forwarding.
WriteWrites binary data to the SSH channel represented by this Channel object. Only the first 30KB of the binary data will be written to the remote SSH server because of a hard-coded 30KB maximum data length in the libssh2lv shared library. For binary data greater than 30KB, the Write All VI should be used instead.