[autotest] Pull a upstream fix about known hosts file failure.

Need to be landed/pushed before cl 64331. Pull a upstream fix.

The host_file got by os.tmpfile() is not available for "ssh -o
UserKnownHostsFile " on ubuntu 11.10 and will have the error "Failed to
add the host to the list of known hosts (/dev/fd/11)", so the patch just
replace it with tempfile.mkstemp()

The original idea of not using '/dev/null' is that using it will
lead to too many messages like 'Warning: Permanently added
'locathost' (RSA) to the list of known hosts'.

This fix is needed when SiteHost is no longer be the parent class of
AbstractHost after 64331 is landed.
Code that creates SSHHost directly without mixing it with
SiteHost will hit this problem.

BUG=None
Test=Manually create a SSHHost (without SiteHost being a parent),
run a command via |run| on the host. Make sure it can ssh to the host
and won't hit the error. Also run dummy suite locally.

Change-Id: Id8d5c44f63a572ea482afeae074cd43cf2de9ec9
Reviewed-on: https://gerrit.chromium.org/gerrit/66136
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
2 files changed