By default, the terminal creates new tabs with the same settings as the current tab. You can change it to always use your default profile for new tabs in Preferences> Launch by changing New Tabs from: to Default Settings .
Note that this is a built-in way to automatically set the background color for certain commands instead of using the script from this other answer:
You can set the name of the settings profile to the name of the command, and Terminal will select this profile when creating a new terminal using Shell> New command ... or Shell> New remote Connection ....
For example, duplicate your default profile, name it "ssh" and set its background color to red. Then use the New command ... to run ssh host.example.com .
It also matches the arguments, so you can choose, for example, different settings for different remote hosts. You can have one with the name "ssh host.example.com" with a blue background, and another with the name "ssh" with a red background to handle any ssh commands that do not match other profiles.
Chris page
source share