Method: Toolshed::ServerAdministration::SSH#initialize

Defined in:
lib/toolshed/server_administration/ssh.rb

#initialize(options = nil) ⇒ SSH

rubocop:disable AbcSize, CyclomaticComplexity, PerceivedComplexity, LineLength



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/toolshed/server_administration/ssh.rb', line 16

def initialize(options = nil) # rubocop:disable AbcSize, CyclomaticComplexity, PerceivedComplexity, LineLength
  options ||= {}
  @password = options[:password] || ''
  @sudo_password = options[:sudo_password] || ''
  @keys = options[:keys] || ''
  @host = options[:host] || ''
  @user = options[:user] || ''
  @ssh_options = options[:ssh_options] || {}
  @commands = options[:commands] || ''
  @password = options[:password] || ''
  @data = []
  @silent = options[:silent] || false
  timeout_period = options[:timeout_period].to_i || 30
  @timeout = Toolshed::Timeout.new(timeout_period: timeout_period)

  set_ssh_options
end