Files
os/tools/vm/vmssh.sh
2026-10-25 14:11:49 +01:00

13 lines
484 B
Bash

#!/usr/bin/env bash
# Runs a command in the Fennec OS QEMU VM (dev image, root/smartfox).
# usage: vmssh.sh [--wait] 'command'
OPTS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 2222)
if [ "$1" = "--wait" ]; then
shift
for _ in $(seq 1 60); do
sshpass -p smartfox ssh "${OPTS[@]}" -o ConnectTimeout=3 root@localhost true 2>/dev/null && break
sleep 2
done
fi
exec sshpass -p smartfox ssh "${OPTS[@]}" root@localhost "$@"