summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2017-01-17 18:55:52 +0000
committerGitHub <noreply@github.com>2017-01-17 18:55:52 +0000
commit9ba9c3cff10645b1448e424be3a61816aa96f384 (patch)
tree1edebeed02720aa993201392b100ef1bd346028e /lib
parent51d1b7e2003bee7c03f363866743abd6c9b6750d (diff)
parent24d230b09a68c8b6857d060b398e779a23ba80bc (diff)
downloadchef-9ba9c3cff10645b1448e424be3a61816aa96f384.tar.gz
Merge pull request #5726 from higanworks/compatible_with_net-ssh4
pass true as 2nd args for Net::SSH.configuration_for by default.
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/knife/ssh.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index f827aca280..53801afffd 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -232,7 +232,7 @@ class Chef
# @param user [String] Optional username for this session.
# @return [Hash<Symbol, Object>]
def session_options(host, port, user = nil)
- ssh_config = Net::SSH.configuration_for(host)
+ ssh_config = Net::SSH.configuration_for(host, true)
{}.tap do |opts|
# Chef::Config[:knife][:ssh_user] is parsed in #configure_user and written to config[:ssh_user]
opts[:user] = user || config[:ssh_user] || ssh_config[:user]