summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2015-10-06 17:12:16 +0100
committerThom May <thom@may.lt>2015-10-06 17:12:16 +0100
commitefeca74e99f8aefb74e0dad53d9c820271a08b9b (patch)
treeb2b6f10a92cb0e0551636cb7e5013383a1af787f
parent0053c17bba34090083a34395657ff1ba1616e213 (diff)
parent091d9e047971cee42193cc3c5fa30bc552175bcf (diff)
downloadchef-efeca74e99f8aefb74e0dad53d9c820271a08b9b.tar.gz
Merge pull request #4023 from higanworks/part_of_3959
pass ssh_password to session
-rw-r--r--lib/chef/knife/ssh.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index 62af853e88..d2df8399db 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -225,6 +225,8 @@ class Chef
if config[:identity_file]
opts[:keys] = File.expand_path(config[:identity_file])
opts[:keys_only] = true
+ elsif config[:ssh_password]
+ opts[:password] = config[:ssh_password]
end
# Don't set the keys to nil if we don't have them.
forward_agent = config[:forward_agent] || ssh_config[:forward_agent]