summaryrefslogtreecommitdiff
path: root/lib/chef/knife/ssh.rb
diff options
context:
space:
mode:
authorsawanoboly <sawanoboriyu@higanworks.com>2015-09-24 19:49:02 +0900
committersawanoboly <sawanoboriyu@higanworks.com>2015-10-05 17:59:29 +0900
commit091d9e047971cee42193cc3c5fa30bc552175bcf (patch)
treec5375c019654c94fa036685dfcdcfd4b0f2df434 /lib/chef/knife/ssh.rb
parent69cf21c8b35d7fb94775db377e810908e5fad54a (diff)
downloadchef-091d9e047971cee42193cc3c5fa30bc552175bcf.tar.gz
pass ssh_password to session
Diffstat (limited to 'lib/chef/knife/ssh.rb')
-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]