From: elijah Date: Sun, 16 Dec 2012 07:31:37 +0000 (-0800) Subject: log ssh command at debug level X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=6b96be3fd05fb093be834e8cbc8d3af31a9e29ca;p=leap%2Fleap_cli.git log ssh command at debug level --- 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