Tuesday, April 16, 2013

Console Into A Cisco Device Using Linux


If you are using some flavor of Linux and find yourself needing to console into a Cisco device using a USB / Serial adapter, here is one way to do this.

You will need to install a program called screen if you don't already have it on your Linux box. It's easy, quick and free so lets get started.

The name of your linux box will be different of course but the command you need will be the same.

abrayton@Home-Mint ~ $ sudo apt-get install screen
[sudo] password for abrayton:

Now that has been installed, lets find your USB Console cable.

abrayton@Home-Mint ~ $ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.432406] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.453385] 00:03: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    2.397087] usb 1-1.4: >MCT U232 converter now attached to ttyUSB0

We can see it in the last line of output just above in bold lettering.

So far so good!

Disclaimer: I needed to open the TTY line as ROOT, your system might be set up a little different so you can try it without root if you would like but below is using root.

Just below is the command to use and a little explanation to go with it.

abrayton@Home-Mint ~ $ sudo screen /dev/ttyUSB0 9600
[sudo] password for abrayton:

We are calling the TTY emulator with " screen " using the /dev/ice ttyUSB0 and specifying the speed of the connection which we all know is 9600 bps.

If everything went well than you should be seeing output that you can read such as what you see below.

Press RETURN to get started.

Home_3750G>

Thats it!

Hope this helped get you moving in the right direction!