Method: EventMachine::Ssh.connect
- Defined in:
- lib/em-ssh.rb
.connect(host, user, opts = {}) {|Session| ... } ⇒ Session Also known as: start
Connect to an ssh server
116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/em-ssh.rb', line 116 def connect(host, user, opts = {}, &blk) opts[:logger] || logger.debug("#{self}.connect(#{host}, #{user}, #{opts})") = { host: host, user: user, port: DEFAULT_PORT }.merge(opts) EM.connect([:host], [:port], Connection, , &blk) end |