I've some rules in .ssh/config file which I would like activate only in interactive mode (ie. terminal background change). Is that possible?
You can alias
ssh if using a non-interactive shell as follows in your
if [ -z "$PS1" ]; then alias ssh='ssh -F ~/.ssh/config-non-interactive' fi
... then copy the non-interactive configuration you'd like to use to
~/.ssh/config-non-interactive and you should be set.