Search This Blog

Monday, June 18, 2018

iTerm 2 setup for Cisco Labs in OS X

I recently started taking some Cisco courses online through Global Knowledge. The Cisco Labs allow you to telnet into various virtual switches, routers, and PCs through their web interface via various methods. In Windows, you can set up Putty to be the default client that is opened when one of these links is clicked:

 

This allows you to administer this virtual lab environment from your normal telnet/ssh client that you'd use for work.

Another option is to use the web telnet client:


But that is about as annoying as it sounds when you're used to your customized terminal experience. In OS X, it seemed to be the only option, and in fact, the first ICND instructor I had said as much during the course intro.

Over the first lunch break I did some research to find out that iTerm can be used to remotely access these Cisco Labs, it just takes a bit of tweaking to get there.



I use iTerm2 as my daily driver for ssh sessions at work to get into various Linux servers and networking equipment. So to use this for my labs, if I could get it to work, was a no-brainer.

  1. Create a new Profile
    1. Name it whatever you'd like. I chose "Cisco Lab Telnet"
  2. In the Command section, switch it to "Command:" then type
    1. /usr/local/bin/telnet $$HOST$$ $$PORT$$
  3. In the URL Schemes, choose telnet
     
    1. Now the telnet command from your browser will be associated with iTerm
Final settings should look similar to:



During the labs it will become necessary to telnet into multiple sessions at once. It can get a bit confusing which tab or window is which, especially in the more advanced labs. I have found that if you right-click (Opt Click) the tab title, and Edit Session, you can then rename the tab:









Now you'll have a nicely organized session to play around with:
 



Enjoy!