Class Net::SSH::Service::Shell::Shell
In: lib/net/ssh/service/shell/shell.rb
Parent: Object

A service class for interacting with a user’s shell on a remote machine. The shell may be interacted with either with or without a pty.

Methods

Public Class methods

Create a new shell over the given connection. The pty_opts parameter must be either a Hash of the allowed values for the Net::SSH::Connection::Channel#request_pty method, or a boolean value (indicating whether a pty should be allocated or not). This will block until the shell is open and ready to receive input.

Public Instance methods

Reinterprets method invocations as requests to send data to the shell. The method name and the arguments are concatenated together with spaces and a newline appended. The resulting string is sent to the shell via send_data.

Returns true if the shell is open.

Sends the given data to the shell on the shell’s stdin stream.

Sends the given data to the shell on the stream indicated by the type parameter.

Return the stderr output (if any) that the shell has generated since the last time this method was invoked.

Returns true if there is any data from the shell on stderr, consuming input on the connection in a non-blocking manner to make sure that any available data is considered.

Return the stdout output (if any) that the shell has generated since the last time this method was invoked.

Returns true if there is any data from the shell on stdout, consuming input on the connection in a non-blocking manner to make sure that any available data is considered.

[Validate]