remote_access: use hostname, etc., hash

When using fairly long hostnames (e.g., the
chromeosA-rowB-rackC-hostD.<sub1>.<sub2> hostnames spat out
by `skylab lease-dut`), one can run into limitations on unix socket path

  unix_listener: path "/tmp/update_kernel.GkRDhJ/ssh_controlroot@chromeosA-rowB-rackC-hostD.<sub1>.<sub2>" too long for Unix domain socket

ssh_config(5) provides '%C' ("hash of %l%h%p%r") as a helpful
fixed-length alternative. The basename ("ssh_control...") in this case
reduces from 87 to 52 characters, leaving room for the "${TMP}" portion.

TEST=`./ --remote=root@chromeosA-rowB-rackC-hostD.<sub1>.<sub2>`

Change-Id: I9e2ad65bd7c49f1d5320dc880b467ef44e012d9b
Tested-by: Brian Norris <>
Reviewed-by: Mike Frysinger <>
1 file changed