aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/commands/shell.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb
index f73a706..f1af3e9 100644
--- a/lib/leap_cli/commands/shell.rb
+++ b/lib/leap_cli/commands/shell.rb
@@ -14,7 +14,9 @@ module LeapCli; module Commands
if node.vagrant?
options << "-i #{vagrant_ssh_key_file}"
end
- exec "ssh -l root -p #{node.ssh.port} #{options.join(' ')} {node.name}"
+ 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}"
end
end