Add $SSH_TTY to remote session check