Merge pull request #3895 from mscherer/fix_option_new_ssh

make sure ssh do not ask password
pull/4420/head
James Cammarata 2013-08-22 10:26:54 -07:00
commit e6ad3b7792
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ class Connection(object):
"-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]