aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-12-15 23:31:37 -0800
committerelijah <elijah@riseup.net>2012-12-15 23:31:37 -0800
commit6b96be3fd05fb093be834e8cbc8d3af31a9e29ca (patch)
treeb9c6e9404363886ad88281fc246e11e84cee635a /lib
parent9c4947ccf2ddd6d60b0baedb8d097721864b4eb2 (diff)
downloadleap_cli-6b96be3fd05fb093be834e8cbc8d3af31a9e29ca.tar.gz
leap_cli-6b96be3fd05fb093be834e8cbc8d3af31a9e29ca.tar.bz2
log ssh command at debug level
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/commands/shell.rb5
1 files changed, 4 insertions, 1 deletions
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