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

CreateShellStream() public method

Creates the shell stream.

The TERM environment variable contains an identifier for the text window's capabilities. You can get a detailed list of these cababilities by using the ‘infocmp’ command.

The column/row dimensions override the pixel dimensions(when nonzero). Pixel dimensions refer to the drawable area of the window.

Client is not connected.
public CreateShellStream ( string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize ) : ShellStream
terminalName string The TERM environment variable.
columns uint The terminal width in columns.
rows uint The terminal width in rows.
width uint The terminal height in pixels.
height uint The terminal height in pixels.
bufferSize int Size of the buffer.
return ShellStream
        public ShellStream CreateShellStream(string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize)
        {
            return CreateShellStream(terminalName, columns, rows, width, height, bufferSize, null);
        }

Same methods

SshClient::CreateShellStream ( string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize, uint>.IDictionary terminalModeValues ) : ShellStream

Usage Example

        private static void connect(string hostName, string userName, string password)
        {
            if (client != null && client.IsConnected)
                return;

            var connectionInfo = new KeyboardInteractiveConnectionInfo(hostName, userName);
            connectionInfo.AuthenticationPrompt += delegate(object sender, AuthenticationPromptEventArgs e)
            {
                foreach (var prompt in e.Prompts)
                    prompt.Response = password;
            };

            client = new SshClient(connectionInfo);
            client.Connect();

            sshStream = client.CreateShellStream("", 80, 40, 80, 40, 1024);

            shellCommand("python", null);

            using (var sr = new System.IO.StreamReader("queryJoints.py"))
            {
                String line;
                while ((line = sr.ReadLine()) != null)
                    pythonCommand(line);
            }
        }
All Usage Examples Of Renci.SshNet.SshClient::CreateShellStream