#!/bin/sh
# Forced command for every SSH login into the measured initramfs.
case "${SSH_ORIGINAL_COMMAND:-}" in
    attest)   exec cat /run/bb/attest.json ;;
    report)   exec cat /run/bb/report.bin ;;
    encrypt)  exec /scripts/fde-encrypt.sh ;;
    ""|unlock) exec /scripts/unlock.sh ;;
    *) echo "commands: attest (JSON), report (raw SNP report), unlock, encrypt"; exit 1 ;;
esac
