Differentiate SSH Sessions by Color

As a website entrepreneur, much of my day to day work involves using the terminal on my laptop to SSH into a remote server. As my business has grown, so has the number of servers that I have to communicate with. The problem that I have been dealing with lately is differentiating between SSH sessions. My partial solution is to use a different background color of each terminal tab/window that holds an ssh session.

Below is a quick overview of my setup:

  • Open a terminal window
  • Choose Terminal > Preferences (command-,)
  • Choose settings from the top tabs
  • Highlight your favorite setting group
  • Choose 'Duplicate Settings' from the Automate Menu at the bottom of list
  • Rename new setting with distinctive name like 'SSH Development'
  • Re-highlight your favorite setting group
  • Click the 'Default' button
  • Highlight your new setting group
  • Give it a distinctive title such as 'SSH Development'
  • Choose a new background color
  • Set the Scrollback to Unlimited
  • Click the 'Shell' tab
  • Check the 'Run command' checkbox
  • Enter the appropriate SSH command, such as 'ssh me@'
  • Repeat the above steps for all servers, choosing a new color each time
  • Close the 'Settings' window
  • Choose Shell > New Tab > SSH Development and you are good to go

I still feel this is a partial solution as the tabs do not get renamed with the titles, so you cannot quickly tell the tabs apart individually. If you have the answer to this, please comment below. Peace Out.


Post new comment

  • Allowed HTML tags: <em> <strong>
  • Lines and paragraphs break automatically.

More information about formatting options

Enter the characters shown in the image.