#!/bin/sh fingerprint=$3 authline="$4 $5" username=$(id -un) userhome=$(getent passwd $(id -un) | (IFS=: read _ _ _ _ _ home _ && echo "$home")) case "$userhome" in '' | *"'"* ) exit ;; esac usercommand=$userhome/.ssh/AnonymousAccessCommand [ -x "$usercommand" ] || exit printf 'command="%s",no-port-forwarding %s\n' "$usercommand $fingerprint" "$authline"