Cheaters to launch an SSH Session

I'm a stalwart Terminal fan for my Engineering tasks. I don't understand why so many colleagues prefer a Terminal emulator like SecureCRT when we have native SSH built right into the OS. Something a lot of SecureCRT guys hold over my head is the nested folders with saved SSH sessions.

It dawned on me this morning that I could duplicate that functionality in something I'm already using: Brett Terpstra's Cheaters.

I won't get into an in-depth review of Cheaters, here. Simply put, it's a small app that launches a web view of a locally-hosted set of websites. Brett's suggestion is to use it as a place to keep cheatsheets (hence the name), like a virtual cubicle wall.

I used a little grep and sed on our existing hosts file, and came up with a Markdown list of links to the hostnames of our devices, using the following syntax:


I spent a couple minutes sorting the list into a reasonable hierarchy, then I used this nice little tutorial to create expanding lists using CSS and jQuery. I ran my Markdown list through Brett's own Marked 2, and copied the HTML to a new cheatsheet.

I took the CSS and javascript from the tutorial linked above, and dropped them into the appropriate folders inside of my Cheaters folder. In my new cheatsheet, I linked the specific CSS and javacscript:

<head data-preserve-html-node="true">
    <link data-preserve-html-node="true" rel="stylesheet" href="css/expandolist.css">
    <script data-preserve-html-node="true" type="text/javascript" src="js/expandolist.js"></script>

I didn't need to worry about jQuery, since Cheaters already uses it. I added the appropriate ID's to the div that holds the list, and to the first ul element. That's really all there was to it. Now I have a nice, organized, expandable list that lives in my menubar, which I can use to launch SSH sessions right in Terminal without having to remember specific hostnames. Not bad for 45 minutes of effort.

My Cheaters SSH list

My Cheaters SSH list

The Terminal

Craig Hockenberry put together a really good list of Terminal tips and tricks useful for developers. Many of these require only a little thought to be useful for network engineers, as well. Being able to do stuff like this is a big part of why I've always been a fan of using Terminal directly, in OS X, to ssh to remote devices, as opposed to using a GUI like SecureCRT.

I was looking for an excuse to play with spark, and cooked up a little shell script that pulls historical stock data. It's still a little rough, but it's got some basic validation, and it's good enough for me to use it for the time being.

I might improve on it here and there, but you should feel free to mess around. I'm sure there are others that provide this functionality and much more, but I wanted to write it myself from soup to nuts.