Fixed command to figure out if cherrypi is available on the DUT

Figured out why we sometimes we were not using cros flash for
imaging the machines. It turns out the ssh command used was incorrect
and (did not specify an empty file for the known hosts) so it will
sometimes will fail when connecting to the DUT.
There was another problem because the code assumed a return value of non-zero
meant cherrypi was not available. We know also check for error code 255
which means the ssh itself failed (not the remote command).

BUG=None
TEST=Imaged a machine

Change-Id: I7c5cef859b73bc9f2a777825914a1c1bb162704b
Reviewed-on: https://chrome-internal-review.googlesource.com/161009
Reviewed-by: Han Shen <shenhan@google.com>
Commit-Queue: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
1 file changed