Class: SSHKit::Backend::Netssh
- 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
-
.pool ⇒ Object
Returns the value of attribute pool.
Attributes inherited from Abstract
Class Method Summary collapse
Instance Method Summary collapse
- #download!(remote, local = nil, options = {}) ⇒ Object
- #upload!(local, remote, options = {}) ⇒ Object
Methods inherited from Abstract
#as, #background, #capture, #execute, #initialize, #make, #rake, #redact, #run, #test, #with, #within
Constructor Details
This class inherits a constructor from SSHKit::Backend::Abstract
Class Attribute Details
.pool ⇒ Object
Returns the value of attribute pool.
88 89 90 |
# File 'lib/sshkit/backends/netssh.rb', line 88 def pool @pool end |
Class Method Details
.config ⇒ Object
94 95 96 |
# File 'lib/sshkit/backends/netssh.rb', line 94 def config @config ||= Configuration.new end |
.configure {|config| ... } ⇒ Object
90 91 92 |
# File 'lib/sshkit/backends/netssh.rb', line 90 def configure yield config end |
Instance Method Details
#download!(remote, local = nil, options = {}) ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/sshkit/backends/netssh.rb', line 72 def download!(remote, local=nil, = {}) summarizer = transfer_summarizer('Downloading', ) remote = File.join(pwd_path, remote) unless remote.to_s.start_with?("/") || pwd_path.nil? with_ssh do |ssh| ssh.scp.download!(remote, local, , &summarizer) end end |
#upload!(local, remote, options = {}) ⇒ Object
64 65 66 67 68 69 70 |
# File 'lib/sshkit/backends/netssh.rb', line 64 def upload!(local, remote, = {}) summarizer = transfer_summarizer('Uploading', ) remote = File.join(pwd_path, remote) unless remote.to_s.start_with?("/") || pwd_path.nil? with_ssh do |ssh| ssh.scp.upload!(local, remote, , &summarizer) end end |