Table of Contents

Class SshCommandInput

Namespace
SshSharp
Assembly
SshSharp.dll

What RunCommandAsync(string, SshSessionOptions?, SshCommandInput?, CancellationToken) writes to the command's standard input: bytes, text or a stream. The input is written while the output is collected, and end-of-file follows it, so commands that read to the end of their input (cat, sh -s, tee) finish.

public sealed class SshCommandInput
Inheritance
SshCommandInput
Inherited Members

Methods

FromBytes(ReadOnlyMemory<byte>)

Input from bytes, sent as they are. The bytes are not copied: leave them unchanged until the command has finished.

FromStream(Stream)

Input read from stream, from its current position to its end, while the command runs: a large file is sent without being held in memory. The stream stays open (the caller disposes it), and since it is read once, this input is for one command.

FromText(string, Encoding?)

Input from text, encoded with encoding (UTF-8 when null), without a byte order mark.