Monday, May 09, 2005

Q: How do I reverse telnet out my aux port?

A:
If you connect one router's aux port to another device's console port, you can telnet to the router, then use reverse telnet to connect to the other device's console via your aux port. Here's how to set it up.
  1. Connect your router's aux port to another device's console port using a Cisco flat crossover cable.
  2. TELNET to your router, enable, and set the aux port up as follows:
    # conf t
    # line aux 0
    (config-line)# modem InOut
    (config-line)# transport preferred all
    (config-line)# transport input all
    (config-line)# transport output all
    ^z
    
  3. Make sure you have an address on your lo0 interface, and the interface is up.
  4. Back in enable mode, find out the line number of your AUX port with #show line. It will look something like this:
       Tty Typ     Tx/Rx    A Modem
         0 CTY              -    - 
    *   97 AUX   9600/9600  - inout
    *   98 VTY              -    - 
        99 VTY              -    - 
       100 VTY              -    - 
       101 VTY              -    - 
       102 VTY              -    - 
    
    On this router it is line 97. It's different from router to router but I've never seen it change.
  5. Now all you need to do is add 2000 to the line number, and telnet to your lo0 address, port 2097.
  6. I like to set up two aliases to save time:
    (c)# alias exec auxup telnet 127.0.0.11 2097
    (c)# alias exec auxdown clear line 97
    

With the setup above, you just connect the router's aux port to the target device. Then from the command line on the router, type auxup. This gives you a console connection to the target device. To end the connection, hit [<shift><ctrl>6] x, then type auxdown.

Update: it looks like the disconnect command (entered after the [<shift><ctrl>6] x) might be the proper way to end the telnet session.

Links to this post:

Create a Link

<< Home