Class: RsshCommand
- Inherits:
-
Object
- Object
- RsshCommand
- Defined in:
- lib/commands/rssh.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.synopsis ⇒ Object
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
#execute ⇒ Object
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 = 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 |