if [[ -n $SSH_CONNECTION ]] ; then echo "I'm logged in remotely" fi