Skip to content

Commit

Permalink
make sure ssh do not ask password
Browse files Browse the repository at this point in the history
For some reason, ssh seems to ask for password even when
PasswordAuthentication is set to no, adding PreferredAuthentications
with the 2 options removed do the trick.
  • Loading branch information
mscherer committed Aug 20, 2013
1 parent 7ac3bbc commit 2bdba17
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ansible/runner/connection_plugins/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def connect(self):
"-o", "PubkeyAuthentication=no"]
else:
self.common_args += ["-o", "KbdInteractiveAuthentication=no",
"-o", "PreferredAuthentications=hostbased,publickey",
"-o", "PasswordAuthentication=no"]
if self.user != pwd.getpwuid(os.geteuid())[0]:
self.common_args += ["-o", "User="+self.user]
Expand Down

0 comments on commit 2bdba17

Please sign in to comment.