#!/usr/bin/env bash
#
# sshx — run a command in the guest.
#
# The host key changes every time a disk is reinstalled, which is every case,
# so known-hosts checking is turned off rather than fought with. This reaches
# a throwaway VM on loopback and nothing else.
set -euo pipefail

# shellcheck source=build/layertest/common.sh
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common.sh"

exec ssh \
  -o StrictHostKeyChecking=no \
  -o UserKnownHostsFile=/dev/null \
  -o LogLevel=ERROR \
  -o ConnectTimeout=5 \
  -p "$SSH_PORT" root@127.0.0.1 "$@"
