class Mysqlknife::SSH

Public Class Methods

new() click to toggle source
# File lib/mysqlknife/ssh.rb, line 5
def initialize
  @config = Configs.instance
end

Public Instance Methods

execute(command) click to toggle source
# File lib/mysqlknife/ssh.rb, line 9
def execute(command)
  %W[ssh
     -t
     -l #{@config.ssh[:user]}
     -i #{@config.ssh[:key]}
     #{@config.ssh[:host]}
     "#{command}"].join(' ')
end