Problem:
Often times when you need console access to a Cisco device and you maybe too far away or due to various reasons you cannot console to/from a server with a serial port.
Solution:
Fear not! Providing you have a Cisco router which is reachable, you can connect a Cisco device’s console port to the routers AUX port for remote access by using “reverse telnet”
The method is simple:
Step 1.
Connect the routers AUX port to console port of the device you wish to connect to with a “Straight Through” cable.
Step 2.
Setup 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
Step 3.
Create a loopback address for this port
router#config t router(config)#int loopback 0 router(config-if)#ip address 10.101.0.1 255.255.255.0 router(config-if)#no shut router(config-if)#exit
Step 4.
You must find out what LINE the router used for the AUX port
router# sh line Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int 0 CTY - - - - - 0 0 0/0 - 5 AUX 19200/19200 - inout - - - 7 0 0/0 - * 6 VTY - - - - - 101226 0 0/0 - 7 VTY - - - - - 33754 0 0/0 - 8 VTY - - - - - 5395 0 0/0 - 9 VTY - - - - - 1180 0 0/0 - 10 VTY - - - - - 280 0 0/0 -
Mine uses line 5.
Step 5.
Telnet to the console port with the IP address set on the Loopback interface to the port number 2000 + line number.
#Note if you setup the routing correctly and point a route for the loopback address to the router, you can telnet remotely without needing to login to the router to telnet.
In my case I will
telnet 10.101.0.1 2005
Step 6.
Once you are complete you must clear the line assigned to the AUX port to drop the connection.
In my case:
router# clear line 5
That’s all you need to know to reverse telnet!
