1
ewconfig/scripts/ssh-sign

17 lines
244 B
Bash
Executable File

#! /usr/bin/env bash
set -e
# Check args
if [ $# != 2 ]; then
echo "Usage: ssh-sign <key_file> <file>"
exit 1
fi
if [ -f $2 ]; then
cat $2 | ssh-keygen -Y sign -f $1 -n file -
else
>&2 echo "File not found: $2"
exit 1
fi