Class: Net::SSH::Service::Shell::Shell

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

method_missing new open? send_data send_extended_data stderr stderr? stdout stdout?

### Public Class methods

new( connection, log, pty_opts )

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

method_missing( sym, *args )

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.

open?()

Returns `true` if the shell is open.

send_data( data )

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

send_extended_data( type, data )

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

stderr()

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

stderr?()

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.

stdout()

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

stdout?()

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]