Applescript, , , " />

Colorful SSH Terminals with Applescript

February 11, 2009

I shell into a lot servers at the same time, and I wanted each terminal to be a different color so I don’t accidently say email eleventy billion people on the production server. I got to play applescript which made me want to cry I dunno if DOS is better.. OMG.

colorful terminals prompts

Copy this: bssh to your /usr/local/bin

Make sure your local bin is in your path and make the file executable:

export PATH=$PATH:/usr/local/bin
chmod +x /usr/local/bin/bssh

In your ~/.ssh/config file you should have a list of servers. Replace them with the names used in the bssh file. For example, if you have prodin the bssh script with dragon . You might also want to edit the colors.

Then, instead of
ssh dragon
bssh dragon

And behold the screen changes colors.

If this makes no sense to you at all, don’t use this. You probably should not ssh to anything. Maybe someday I will make it read a pretty yaml or xml file instead of hard coding server names. Then again, Applescript did make me cry in my soup. Don’t hold your breath unless N2O is involved.

Leave a Reply