Renci.SshNet.SshClient.CreateShell C# (CSharp) Method

CreateShell() public method

Creates the shell.
Client is not connected.
public CreateShell ( Encoding encoding, string input, Stream output, Stream extendedOutput ) : Shell
encoding System.Text.Encoding The encoding.
input string The input.
output Stream The output.
extendedOutput Stream The extended output.
return Shell
        public Shell CreateShell(Encoding encoding, string input, Stream output, Stream extendedOutput)
        {
            return CreateShell(encoding, input, output, extendedOutput, string.Empty, 0, 0, 0, 0, null, 1024);
        }

Same methods

SshClient::CreateShell ( Encoding encoding, string input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, uint>.IDictionary terminalModes ) : Shell
SshClient::CreateShell ( Encoding encoding, string input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, uint>.IDictionary terminalModes, int bufferSize ) : Shell
SshClient::CreateShell ( Stream input, Stream output, Stream extendedOutput ) : Shell
SshClient::CreateShell ( Stream input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, uint>.IDictionary terminalModes ) : Shell
SshClient::CreateShell ( Stream input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, uint>.IDictionary terminalModes, int bufferSize ) : Shell

Usage Example

Beispiel #1
0
 /// <summary>
 /// Represents instance of the SSH shell object.
 /// </summary>
 /// <param name="sshClient">The SSH client.</param>
 /// <param name="input">The input.</param>
 /// <param name="output">The output.</param>
 /// <param name="extendedOutput">The extended output.</param>
 /// <param name="terminalName">Name of the terminal.</param>
 /// <param name="columns">The columns.</param>
 /// <param name="rows">The rows.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="bufferSize">Size of the buffer for output stream.</param>
 internal SshShell(Renci.SshNet.SshClient sshClient, Stream input, Stream output, Stream extendedOutput,
                   string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize)
 {
     _sshShell           = sshClient.CreateShell(input, output, extendedOutput, terminalName, columns, rows, width, height, null, bufferSize);
     _sshShell.Starting += _sshShell_Starting;
     _sshShell.Started  += _sshShell_Started;
     _sshShell.Stopping += _sshShell_Stopping;
     _sshShell.Stopped  += _sshShell_Stopped;
 }