Revert "Explicitly set the user option for ssh connections"

This reverts commit 0f91add86f.

Fixes #8216
This commit is contained in:
James Cammarata 2014-07-21 10:32:43 -05:00
parent 571dbe09c3
commit 00e089e503

View file

@ -94,7 +94,8 @@ class Connection(object):
self.common_args += ["-o", "KbdInteractiveAuthentication=no", self.common_args += ["-o", "KbdInteractiveAuthentication=no",
"-o", "PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey", "-o", "PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey",
"-o", "PasswordAuthentication=no"] "-o", "PasswordAuthentication=no"]
self.common_args += ["-o", "User=" + (self.user or pwd.getpwuid(os.geteuid())[0])] if self.user != pwd.getpwuid(os.geteuid())[0]:
self.common_args += ["-o", "User="+self.user]
self.common_args += ["-o", "ConnectTimeout=%d" % self.runner.timeout] self.common_args += ["-o", "ConnectTimeout=%d" % self.runner.timeout]
return self return self