Module: Vagabond::Actions::SSH
- Defined in:
- lib/vagabond/actions/ssh.rb
Instance Method Summary collapse
Instance Method Details
#ssh ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/vagabond/actions/ssh.rb', line 4 def ssh if(lxc.exists?) if(lxc.running?) ui.info "#{ui.color('Vagabond:', :bold)} SSH connect to: #{ui.color(name, :cyan)}" exec("#{Config[:sudo]}ssh root@#{lxc.container_ip(10, true)} -i /opt/hw-lxc-config/id_rsa -oStrictHostKeyChecking=no") else ui.error "Node not running: #{name}" end else ui.error "Node not created: #{name}" end end |