From 6b96be3fd05fb093be834e8cbc8d3af31a9e29ca Mon Sep 17 00:00:00 2001 From: elijah Date: Sat, 15 Dec 2012 23:31:37 -0800 Subject: log ssh command at debug level --- lib/leap_cli/commands/shell.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/leap_cli/commands/shell.rb') diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb index f1af3e9..5d8fc66 100644 --- a/lib/leap_cli/commands/shell.rb +++ b/lib/leap_cli/commands/shell.rb @@ -16,7 +16,10 @@ module LeapCli; module Commands end username = 'root' # the echo sets the terminal title. it would be better to do this on the server - exec "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\" && ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}" + cmd = "ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}" + log 2, cmd + title = "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\"" + exec "#{title} && #{cmd}" end end -- cgit v1.2.3