remote_access: Don't force ssh port to 22 if unspecified

It's possible to specify a default port for a DUT in your .ssh/config
file.  This is super useful if your setup looks like this:

Local DUT ===Ethernet=== Local computer ===SSH=== Remote Build Machine

In the above scenario if your Local DUT had a local IP address of
192.168.0.59 then you could ssh from the local computer to the remote
build machine with:

  ssh -R8022:192.168.0.59:22 remote_build_machine

After doing that, you'd define this in your .ssh/config:

  Host my_dut
    Port 8022
    HostName 127.0.0.1

...and now you can ssh from your Remote Build Machine do your dut with
just "ssh my_dut".

The problem is: if you try to use update_kernel to update the kernel
of that DUT the port will be overridden back to 22.  :(

Let's fix remote_access to not override the port unless it was
specified.

BUG=None
TEST=update_kernel

Change-Id: I62d8fd772574d4c6e5fe5ede1a386319438b9b8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2202616
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
1 file changed