diff options
author | Thom May <thom@may.lt> | 2018-02-14 10:26:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-14 10:26:24 +0000 |
commit | 41936b1b547524cee3d467f6e96523acb2b64a85 (patch) | |
tree | b7a9fbc22f92e7085b283a642655b9d2c2a500ec | |
parent | 52ad20d31bc7a1f65410eb8b55427613bd33efe3 (diff) | |
parent | 6a6e7d351693d71670f2c06869b4481b4db7bc24 (diff) | |
download | chef-41936b1b547524cee3d467f6e96523acb2b64a85.tar.gz |
Merge pull request #6794 from cramaechi/CHEF-4342
Fix "knife ssh" authentication scheme #4342
-rw-r--r-- | lib/chef/knife/ssh.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 8e13425f82..885ebc4faa 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -576,8 +576,13 @@ class Chef configure_user configure_password @password = config[:ssh_password] if config[:ssh_password] - configure_ssh_identity_file - configure_ssh_gateway_identity + + # If a password was not given, check for SSH identity file. + if !@password + configure_ssh_identity_file + configure_ssh_gateway_identity + end + configure_gateway configure_session |