module Proxy::RemoteExecution::Ssh

Constants

VERSION

Public Class Methods

new() click to toggle source
# File lib/smart_proxy_remote_execution_ssh.rb, line 8
def initialize
  unless private_key_file
    raise "settings for `ssh_identity_key` not set"
  end

  unless File.exist?(private_key_file)
    raise "Ssh public key file #{private_key_file} doesn't exist.\n"             "You can generate one with `ssh-keygen -t rsa -b 4096 -f #{private_key_file} -N ''`"
  end

  unless File.exist?(public_key_file)
    raise "Ssh public key file #{public_key_file} doesn't exist"
  end

  @dispatcher = Proxy::RemoteExecution::Ssh::Dispatcher.spawn('proxy-ssh-dispatcher',
                                                              :clock  => Proxy::Dynflow.instance.world.clock,
                                                              :logger => Proxy::Dynflow.instance.world.logger)
end

Public Instance Methods

dispatcher() click to toggle source
# File lib/smart_proxy_remote_execution_ssh.rb, line 27
def dispatcher
  @dispatcher || initialize
end
private_key_file() click to toggle source
# File lib/smart_proxy_remote_execution_ssh.rb, line 31
def private_key_file
  File.expand_path(Ssh::Plugin.settings.ssh_identity_key_file)
end
public_key_file() click to toggle source
# File lib/smart_proxy_remote_execution_ssh.rb, line 35
def public_key_file
  File.expand_path("#{private_key_file}.pub")
end