Tabbed Telnet Sessions for Gnome Terminal
This blog entry is adapted from a comment I originally posted on http://www.the-little-things.net/?p=16
GNS3 has become quite a popular tool with many people in the Networks field, either for learning or testing configurations. The ability to telnet simultaneously to the devices in a lab using tabbed sessions is quite useful.
The reason tabbed telnet sessions are useful, is that with many telnet sessions the tabbed sessions save desktop real estate, are more organised and if each tab has the name of the device, it helps to go to the device you wish to efficiently.
For those looking for using multiple tabs, there is a version of Tera Term with Tera term collector on Windows that can do it which is free or SecureCRT which is not free but is a great piece of software. Putty also has Putty Connection Manager for tabbed browsing on the Windows Platform.
#!/bin/sh # created John Spencer CCIE#14405 Fri 26 Oct 2007 21:15:01 BST # # Purpose to Telnet to routers in Dynagen or GNS Lab running on local machine # Script would be adaptable to telnet to devices on other hosts without # difficulty by replacing localhost with a hostname or IP address. # RouterTelnet is the name of a profile saved in gnome terminal # with preferred colours and fonts. # # To use without a specified profile use tab -t etc instead of tab-with-profile. # e.g tab -t R1 -e telnet localhost 2000\ # For other options in a shell enter gnome-terminal help # You may adapt or distribute but include the above text. gnome-terminal \ tab-with-profile=RouterTelnet -t R1 -e telnet localhost 2000\ tab-with-profile=RouterTelnet -t R2 -e telnet localhost 2001\ tab-with-profile=RouterTelnet -t R3 -e telnet localhost 2002\ tab-with-profile=RouterTelnet -t R4 -e telnet localhost 2003\ tab-with-profile=RouterTelnet -t R5 -e telnet localhost 2004\ tab-with-profile=RouterTelnet -t R6 -e telnet localhost 2005\ tab-with-profile=RouterTelnet -t R7_SW1 -e telnet localhost 2006\ tab-with-profile=RouterTelnet -t R8_SW2 -e telnet localhost 2007\ tab-with-profile=RouterTelnet -t R9 -e telnet localhost 2008\ #---End of File---#
Save the file as telnet.sh and make it executable. If you double click this file it will telnet to each device in the script with multiple tabs and set the name of each tab. If a router is not running the script will still open those that are.
I find this quite useful to keep on the desktop. Notice I also use a gnome-terminal profile called RouterTelnet which contains my colour preferences, to use the default it is explained within the comments in the script.
New Blog
More to follow, in the meantime I hope you all had a great Christmas and wish you a prosperous New Year.