1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #3895 from mscherer/fix_option_new_ssh

make sure ssh do not ask password
This commit is contained in:
James Cammarata 2013-08-22 10:26:54 -07:00
commit e6ad3b7792

View file

@ -85,6 +85,7 @@ class Connection(object):
"-o", "PubkeyAuthentication=no"] "-o", "PubkeyAuthentication=no"]
else: else:
self.common_args += ["-o", "KbdInteractiveAuthentication=no", self.common_args += ["-o", "KbdInteractiveAuthentication=no",
"-o", "PreferredAuthentications=hostbased,publickey",
"-o", "PasswordAuthentication=no"] "-o", "PasswordAuthentication=no"]
if self.user != pwd.getpwuid(os.geteuid())[0]: if self.user != pwd.getpwuid(os.geteuid())[0]:
self.common_args += ["-o", "User="+self.user] self.common_args += ["-o", "User="+self.user]