Module: DirectSsh
- Defined in:
- lib/direct_ssh.rb,
lib/direct_ssh/version.rb
Constant Summary collapse
- VERSION =
"2.1.1"
Class Method Summary collapse
Class Method Details
.start(host, user, options = {}, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/direct_ssh.rb', line 9 def self.start(host, user, ={}, &block) validator = Validator.new ssh = validator.start(host, user, ) KeyHandler.send_key_to_remote(ssh) if !validator.direct if block_given? retval = yield ssh ssh.close return retval else return ssh end end |