Files
os/tools/vm/vmssh.sh
2026-10-24 09:06:06 +02:00

13 lines
483 B
Bash

#!/usr/bin/env bash
# Runs a command in the SmartFox 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 "$@"