#!/bin/sh

if [ -n "${SSH_CLIENT}" ] || [ -n "${SSH_TTY}" ]; then
  exit 0
fi

# parent pid of the shell is sshd
# shellcheck disable=SC2249
case $(ps -o comm= -p "${PPID}") in
  sshd|*/sshd) exit 0;;
esac

exit 1
