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

CreateShell() public method

Creates the shell.
Client is not connected.
public CreateShell ( Stream input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, uint>.IDictionary terminalModes ) : Shell
input Stream The input.
output Stream The output.
extendedOutput Stream The extended output.
terminalName string Name of the terminal.
columns uint The columns.
rows uint The rows.
width uint The width.
height uint The height.
terminalModes uint>.IDictionary The terminal mode.
return Shell
        public Shell CreateShell(Stream input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModes)
        {
            return CreateShell(input, output, extendedOutput, terminalName, columns, rows, width, height, terminalModes, 1024);
        }

Same methods

SshClient::CreateShell ( Encoding encoding, string input, Stream output, Stream extendedOutput ) : Shell
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, 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;
 }