Class Net::SSH::Session
In: lib/net-ssh-session/version.rb
lib/net/ssh/session.rb
Parent: Object

Methods

close   exec   last_command   logger=   method_missing   new   on_output   open   run   run_multiple  

Included Modules

Net::SSH::SessionHelpers

Constants

VERSION = '0.1.6'

Attributes

connection  [R] 
history  [R] 
host  [R] 
logger  [R] 
options  [R] 
password  [R] 
shell  [R] 
timeout  [R] 
user  [R] 

Public Class methods

Initialize a new ssh session @param [String] remote hostname or ip address @param [String] remote account username @param [String] remote account password @param [Hash] options hash

Public Instance methods

Close connection with remote server @return [Boolean]

Execute command @param [String] command to execute @param [Block] output event block @return [Integer] command execution exit code

Get last executed command @return [SessionCommand]

Set a global session logger for commands @param [Logger] logger instance

Execute a dynamic command @param [String] command name @params [Array] command arguments

Establish connection with remote server @param [Integer] max timeout in seconds @return [Boolean]

Execute a single command @param [String] comand to execute @param [Hash] execution options @return [SessionCommand]

Execute multiple commands @param [Array] set of commands to execute @param [Hash] execution options @return [Array] set of command execution results

Execution options are the following: options[:break] - If set to `true`, execution chain will break on first failed command

[Validate]