Merge pull request #11163 from sivel/ssh-private-key-fixme

Re-introduce ssh connection private key support
This commit is contained in:
Brian Coca 2015-06-11 09:16:27 -04:00
commit c8fde467b5

View file

@ -99,11 +99,8 @@ class Connection(ConnectionBase):
if self._connection_info.port is not None: if self._connection_info.port is not None:
self._common_args += ("-o", "Port={0}".format(self._connection_info.port)) self._common_args += ("-o", "Port={0}".format(self._connection_info.port))
# FIXME: need to get this from connection info if self._connection_info.private_key_file is not None:
#if self.private_key_file is not None: self._common_args += ("-o", "IdentityFile=\"{0}\"".format(os.path.expanduser(self._connection_info.private_key_file)))
# self._common_args += ("-o", "IdentityFile=\"{0}\"".format(os.path.expanduser(self.private_key_file)))
#elif self.runner.private_key_file is not None:
# self._common_args += ("-o", "IdentityFile=\"{0}\"".format(os.path.expanduser(self.runner.private_key_file)))
if self._connection_info.password: if self._connection_info.password:
self._common_args += ("-o", "GSSAPIAuthentication=no", self._common_args += ("-o", "GSSAPIAuthentication=no",
"-o", "PubkeyAuthentication=no") "-o", "PubkeyAuthentication=no")