Lines Matching +full:touch +full:- +full:keys
1 # $OpenBSD: keys-command.sh,v 1.8 2021/09/30 04:22:50 dtucker Exp $
4 tid="authorized keys from command"
6 if [ -z "$SUDO" -a ! -w /var/run ]; then
10 rm -f $OBJ/keys-command-args
12 touch $OBJ/keys-command-args
13 chmod a+rw $OBJ/keys-command-args
15 expected_key_text=`awk '{ print $2 }' < $OBJ/ssh-ed25519.pub`
16 expected_key_fp=`$SSHKEYGEN -lf $OBJ/ssh-ed25519.pub | awk '{ print $2 }'`
21 trap "${SUDO} rm -f ${KEY_COMMAND}" 0
22 cat << _EOF | $SUDO sh -c "rm -f '$KEY_COMMAND' ; cat > '$KEY_COMMAND'"
24 echo args: "\$@" >> $OBJ/keys-command-args
25 echo "$PATH" | grep -q mekmitasdigoat && exit 7
27 if test $# -eq 6 ; then
30 test "x\$4" != "xssh-rsa" && exit 4
38 if ! $OBJ/check-perm -m keys-command $KEY_COMMAND ; then
40 $SUDO rm -f $KEY_COMMAND
44 if [ -x $KEY_COMMAND ]; then
49 grep -vi AuthorizedKeysFile $OBJ/sshd_proxy.bak
57 ${SSH} -F $OBJ/ssh_proxy somehost true
58 if [ $? -ne 0 ]; then
63 # Check legacy behavior of no-args resulting in username being passed.
65 grep -vi AuthorizedKeysFile $OBJ/sshd_proxy.bak
73 ${SSH} -F $OBJ/ssh_proxy somehost true
74 if [ $? -ne 0 ]; then