×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Reverse Telnet

What is Reverse Telnet and how do I configure it? by hexn
Posted: 30 Nov 01 (Edited 3 Jun 02)

Reverse Telnet gives you the ability to telnet to a device, and then console to another device from there. For example, you could telnet to a router, and then console into a switch, or a modem, or anything that has a console port.  There are alot of devices out there that dont have remote access built into them, their only option is a console session.  Well, this will allow you to remotely manage these devices.

Before we even begin, lets set up the cabling first.


You need a straight through cable going from the console port of the console-only device to the AUX port on your router.

Now lets get going with the router config:


In order to set up reverse telnet, these are the steps:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1.  Configure the AUX port.

router#config t
router(config)#line aux 0
router(config-line)#modem InOut
router(config-line)#transport input all
router(config-line)#speed 19200
router(config-line)#exit

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2.  Then you must create a loopback addresss

router#config t
router(config)#int loopback 0
router(config-if)#ip address 10.0.0.1 255.0.0.0
router(config-if)#no shut
router(config-if)#exit

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.  Now you must find out what "line" the router uses for the AUX port.

OUTSIDE OF CONFIG MODE (hit CTRL-Z to get out) enter the command "sh line"
you will get an output resembling the following:

router#sh line
   Tty Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
     0 CTY              -    -      -    -    -      0       0     0/0       -
   225 AUX  19200/19200 - inout     -    -    -      0       0     0/0       -
*  226 VTY              -    -      -    -    -     10       0     0/0       -
   227 VTY              -    -      -    -    -      0       0     0/0       -
   228 VTY              -    -      -    -    -      0       0     0/0       -
   229 VTY              -    -      -    -    -      0       0     0/0       -
   230 VTY              -    -      -    -    -      0       0     0/0       -

This particular router (a 3660) uses line 225 for the AUX port.

--------

This is the output from a 2611.

router#sh line
   Tty Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
     0 CTY              -    -      -    -    -      0       0     0/0       -
    65 AUX  19200/19200 - inout     -    -    -      8       0  2177/0       -
*   66 VTY              -    -      -    -    -     24       0     0/0       -
    67 VTY              -    -      -    -    -      3       0     0/0       -
    68 VTY              -    -      -    -    -      1       0     0/0       -
    69 VTY              -    -      -    -    -      0       0     0/0       -
    70 VTY              -    -      -    -    -      0       0     0/0       -

It uses line 65 for the AUX port. (The port with the * by it is
the line you are currently connected to.)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.  Telnet:

To do this, you will telnet to the IP address you set on the loopback interface.
The port number you will telnet to is 2000+line#.  

So for the 3660, assuming my loopback interface has IP address of 10.0.0.1,
I would telnet to 10.0.0.1:2225

For the 2611, assuming my loopback interface has IP address of 10.0.0.1,
I would telnet to 10.0.0.1:2065.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

5. Finishing:

When you are done, while holding the keys CTRL+SHIFT+6, press the letter X.
This will kick you out of the AUX port.

The router will still keep the line connected and no one will be able to
retelnet back in until you clear the line.

To do this, OUTSIDE OF CONFIG MODE (hit CTRL-Z to get out of config mode)
you enter the command "clear line xxx" where "x" is the line#.

So for the 3660, I would enter "clear line 225"

On the 2611, I would enter "clear line 65"

It will ask you to confirm, just hit the enter key.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And that is everything there is to know about reverse telnetting.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here is a sample configuration, this is everything you need to reverse telnet:


sample-config#sh run
Building configuration...

Current configuration : 3481 bytes
!
!
interface Loopback0
 ip address 10.0.0.1 255.0.0.0
!
line con 0
 transport input none
line aux 0
 modem InOut
 transport input all
 speed 19200
line vty 0 4
 password xxxxxxx
 login
!
end

Back to Cisco FAQ Index
Back to Cisco Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close