Merge pull request #16159 from thatch45/passwd_fix

Add passwd opts checking to key_opts
This commit is contained in:
Thomas S Hatch 2014-09-25 16:09:06 -06:00
commit 2f524b638c

View File

@ -84,8 +84,11 @@ class Shell(object):
''' '''
options = [ options = [
'KbdInteractiveAuthentication=no', 'KbdInteractiveAuthentication=no',
'PasswordAuthentication=no',
] ]
if self.passwd:
options.append('PasswordAuthentication=yes')
else:
options.append('PasswordAuthentication=no')
if self.opts['_ssh_version'] > '4.9': if self.opts['_ssh_version'] > '4.9':
options.append('GSSAPIAuthentication=no') options.append('GSSAPIAuthentication=no')
options.append('ConnectTimeout={0}'.format(self.timeout)) options.append('ConnectTimeout={0}'.format(self.timeout))