summaryrefslogtreecommitdiff
path: root/lib/leap_cli/ssh/backend.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/ssh/backend.rb')
-rw-r--r--lib/leap_cli/ssh/backend.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/leap_cli/ssh/backend.rb b/lib/leap_cli/ssh/backend.rb
index f42379cc..67c6ec9a 100644
--- a/lib/leap_cli/ssh/backend.rb
+++ b/lib/leap_cli/ssh/backend.rb
@@ -94,7 +94,7 @@ module LeapCli
# some prewritten servers-side scripts
def scripts
- @scripts ||= LeapCli::SSH::Scripts.new(self, @host)
+ @scripts ||= LeapCli::SSH::Scripts.new(self, @host.hostname)
end
private
@@ -139,6 +139,9 @@ module LeapCli
@logger.log(:failed, args.join(' '), host: @host.hostname) do
@logger.log("Connection timed out")
end
+ if @options[:raise_error]
+ raise LeapCli::SSH::TimeoutError, exc.to_s
+ end
else
raise
end