Class: RsshCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/rssh.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject



6
7
8
# File 'lib/commands/rssh.rb', line 6

def self.synopsis
  "Ssh on the secondary interface to work around network freeze"
end

Instance Method Details

#executeObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/commands/rssh.rb', line 10

def execute

  argv = parse_options
  return unless argv.length == 1

  target_machine = argv[0]
  with_target_vms(argv) do |machine|
    
    old_info = machine.ssh_info.dup
    old_info[:port] = 22
    old_info[:host] =  machine.config.vm.hostname
    # key_path = info[:private_key_path]
    # `ssh -i #{key_path} vagrant@#{machine.host_name}`
    Vagrant::Util::SSH.exec(old_info)
  end

end