System: Ubuntu 20.04
My goal: change terminal text color when I connect to SSH host and reset the terminal text color once the SSH connection is closed.
Status: I managed to change the text color when I establish the SSH connection (--> How to change terminal colors when connecting to SSH hosts)
.bash_profile
[ -n "$SSH_CONNECTION" ] && echo -e '\033]10;#ff0000\007'
Problem: The terminal text color is not reset once I close the SSH connection.
Can this be done by editing .bash_profile
? How can this be done not following the approach used in the mentioned article?