aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/util/remote_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/util/remote_command.rb')
-rw-r--r--lib/leap_cli/util/remote_command.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/leap_cli/util/remote_command.rb b/lib/leap_cli/util/remote_command.rb
index 93d1bd1..847b056 100644
--- a/lib/leap_cli/util/remote_command.rb
+++ b/lib/leap_cli/util/remote_command.rb
@@ -35,6 +35,12 @@ module LeapCli; module Util; module RemoteCommand
end
yield cap
+ rescue Capistrano::ConnectionError => exc
+ # not sure if this will work if english is not the locale??
+ if exc.message =~ /Too many authentication failures/
+ at_exit {ssh_config_help_message}
+ end
+ raise exc
end
private