Method: Fog::Compute::Server#ssh

Defined in:
lib/fog/compute/models/server.rb

#ssh(commands, options = {}) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/fog/compute/models/server.rb', line 27

def ssh(commands, options={})
  require 'net/ssh'
  requires :public_ip_address, :username

  options[:key_data] = [private_key] if private_key
  Fog::SSH.new(public_ip_address, username, options).run(commands)
end