From 628165fd0a4e03bb7bbef3a464447924195e10b8 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 23 Oct 2012 03:53:06 -0700 Subject: added a bunch of new commands, including init-node and deploy --- lib/leap_cli/commands/shell.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/leap_cli/commands/shell.rb (limited to 'lib/leap_cli/commands/shell.rb') diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb new file mode 100644 index 0000000..df392bd --- /dev/null +++ b/lib/leap_cli/commands/shell.rb @@ -0,0 +1,12 @@ +module LeapCli; module Commands + + desc 'Log in to the specified node with an interactive shell' + arg_name '', :optional => false, :multiple => false + command :shell, :ssh do |c| + c.action do |global_options,options,args| + node = get_node_from_args(args) + exec "ssh -l root -o 'HostName=#{node.ip_address}' -o 'HostKeyAlias=#{node.name}' -o 'UserKnownHostsFile=#{path(:known_hosts)}' -o 'StrictHostKeyChecking=yes' #{node.name}" + end + end + +end; end \ No newline at end of file -- cgit v1.2.3