Class: SSHKit::Backend::Netssh

Inherits:
Abstract
  • Object
show all
Defined in:
lib/sshkit/backends/netssh.rb,
lib/sshkit/backends/netssh/known_hosts.rb

Defined Under Namespace

Classes: Configuration, KnownHosts, KnownHostsKeys

Class Attribute Summary collapse

Attributes inherited from Abstract

#host

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

#as, #background, #capture, #execute, #initialize, #make, #rake, #run, #test, #with, #within

Constructor Details

This class inherits a constructor from SSHKit::Backend::Abstract

Class Attribute Details

.poolObject

Returns the value of attribute pool.



69
70
71
# File 'lib/sshkit/backends/netssh.rb', line 69

def pool
  @pool
end

Class Method Details

.configObject



75
76
77
# File 'lib/sshkit/backends/netssh.rb', line 75

def config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



71
72
73
# File 'lib/sshkit/backends/netssh.rb', line 71

def configure
  yield config
end

Instance Method Details

#download!(remote, local = nil, options = {}) ⇒ Object



54
55
56
57
58
59
# File 'lib/sshkit/backends/netssh.rb', line 54

def download!(remote, local=nil, options = {})
  summarizer = transfer_summarizer('Downloading')
  with_ssh do |ssh|
    ssh.scp.download!(remote, local, options, &summarizer)
  end
end

#upload!(local, remote, options = {}) ⇒ Object



47
48
49
50
51
52
# File 'lib/sshkit/backends/netssh.rb', line 47

def upload!(local, remote, options = {})
  summarizer = transfer_summarizer('Uploading')
  with_ssh do |ssh|
    ssh.scp.upload!(local, remote, options, &summarizer)
  end
end