Module Net::SSH::SessionHelpers
In: lib/net/ssh/session_helpers.rb

Methods

Public Instance methods

Execute command and capture any output @param command [String] command to execute @return [String] execution result

Swith current directory @param path [String] directory path @return [Boolean] execution result

Check if remote directory exists @param path [String] directory path @return [Boolean] execution result

Get an environment variable @param key [String] variable name @return [String] variable value

Export an environment variable @param key [String] variable name @param value [String] variable value @return [Boolean] execution result

Export environment vars from hash @param data [Hash] @return [Boolean] execution result

Check if remote file exists @param [String] file path @return [Boolean] execution result

Check if group exists @param [String] group name @return [Boolean]

Check if user exists @param [String] username @return [Boolean]

Kill a process with the signal @param pid [String] process id @param signal [String] signal to send @return [Boolean] exection result

Get last executed command exit code @return [Integer] exit code

Check if process with PID is running @param pid [String] process id @return [Boolean] execution result

Get current directory @return [String]

Read remote file contents @path [String] file path @return [String] file contents

Execute command with sudo @param [String] command string @param [Hash] execution options @return [SessionCommand]

Check if a symbilic link exists @param [String] file path @return [Boolean]

Set a timeout context for execution @param time [Integer] max time for execution in seconds @param block [Block] block to execute

[Validate]