Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BKR-1655] Adjust for net-ssh v6+ #1652

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/beaker/ssh_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ def connect_block host, user, ssh_opts, options
max_connection_tries = options[:max_connection_tries] || 11
begin
@logger.debug "Attempting ssh connection to #{host}, user: #{user}, opts: #{ssh_opts}"

if ssh_opts.include?(:strict_host_key_checking) && (Net::SSH::Version::CURRENT.major > 5)
ssh_opts[:paranoid] = ssh_opts.delete(:strict_host_key_checking)
end

Net::SSH.start(host, user, ssh_opts)
rescue *RETRYABLE_EXCEPTIONS => e
if try <= max_connection_tries
Expand Down