The Pug Automatic

Colored SSH terminals in OS X

Written June 14, 2007. Tagged OS X.

With the bundled terminal app in OS X, it's possible to save and re-establish SSH connections in the GUI. Furthermore, you can customize the terminal colors (and various other things) and save that along with the connection, so that you easily can establish SSH connections that can be told apart at a glance.

As if that wasn't enough, Quicksilver can be made to index the saved sessions for even easier reconnection.

Set up the SSH connection

Hit File > Connect to Server… (⇧⌘K). Select "Secure Shell (ssh)" in the left column, then click the "+" button under the right column. A prompt should appear. Input the server address, e.g. "example.com", and press "OK". Select that server in the right column and specify a username in the "User" field. This is not necessary if the remote username is the same as you use locally.

Hit the "Connect" button and a SSH connection should be established. If you don't want to be prompted for the password when connecting, you can set up RSA keys.

Customize colors

Select Terminal > Window Settings…. In the "Color" panel, customize to your heart's content. You can change font and cursor style in the "Display" panel.

Save

When you're satisfied, do File > Save (⌘S). Specify some recognizable name and keep all the defaults.

You're now free to remove the connection from "Connect to Server" if you feel like it; the SSH settings are saved with the window.

Open

To re-establish the saved connection, with the customized colors, just File > Open… (⌘O). When the "Open" dialog appears, start typing the name to select the file and hit to open it.

The files are by default saved in ~/Library/Application Support/Terminal. If you add that directory to the Quicksilver catalog, you can use Quicksilver to trigger connections.

Open Quicksilver and hit ⌘, for the "Preferences" window. Find the "Catalog" pane and select "Custom". Click the "+" and select "File & Folder Scanner". Select the "Terminal" directory. Set "Include Contents: Folder Contents". Some more options should appear. Check "Omit source item" to just index the saved windows, not the "Terminal" directory itself. Hit the circular arrow in the bottom-right to rescan the catalog.

If everything worked as it should, you can now open your saved, colored SSH terminals straight from Quicksilver. Enjoy!