I’m putting things here I often come back to with Raspberry Pi Setups but didn’t think they’d actually belong in their own article, at least as of yet.
Detecting SSH vs console
I’ve used this when wanting to start certain code when in console mode vs SSH logins. Edit ~/.profile and add commands as needed.
if [ "$SSH_CONNECTION" != "" ]; then echo SSH being used, enabling ssh-session specific functionality else echo Enabling console-specific functionality fi