Cancel CISCO telnet Session

Posted on 2008-10-17
Last Modified: 2012-06-22
How do i cancel a telnet session in a cisco router? i try to telnet to a device that is really not online and I do not want to wait until it times out to cancel. Is there a combination of keys?
Question by:TAMSCODAN
  • 6
  • 4
  • 4
  • +2
LVL 15

Expert Comment

ID: 22745555
To break a session on a cisco router you would hold
ctrl and shift
then hit "6" and then "x"

Author Comment

ID: 22745605
i tried that and it didn't work
LVL 50

Expert Comment

by:Don Johnston
ID: 22745646
Are you pressing Ctl + Shift + 6 at the same time then releasing and then hitting "x"?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 15

Expert Comment

ID: 22745657
you did release and wait a second before hitting x? I just tried it on two different routers and it worked.

Expert Comment

ID: 22746003
ctrl + shift 6 and x, is used to clear a telnet session when logged into a multiple cisco devices in serial, such as via reverse telnet or telnetted to another device from one device.

I'm not aware of a way to clear a session externally to the router, apart from ring the user and get them to log out cleanly.

You can enable multiple lines and adjust idle timeout periods.
LVL 50

Expert Comment

by:Don Johnston
ID: 22746071

Good point. I was assuming that this was about a session FROM a Cisco router.

TAMSCODAN, please let us know the details. What are you telnetting from and what are you telnetting to?


Author Comment

ID: 22746562
I am telneting from a CISCO 7604 to another device however the device does not seem to be available so the telnet keeps trying and I have to sit there and wait until it times out. I have tried the above but it only works for ping and trace routes, not for telnet.
LVL 50

Expert Comment

by:Don Johnston
ID: 22746574
To break a ping or traceroute all you need to do is issue the break sequence (ctl+shift+6). To suspend a telnet session you have to follow the break sequence with an "x".
LVL 23

Expert Comment

ID: 22746875
To break a command that hasn't succeeded yet, try typing just  
the  default break sequence

Repeat several times in a row,  don't press 'x'  after each time.

The sequence

Ctrl+Shift+6,  then  x
is used to put a connected telnet session into the background, and give
you a router command prompt where you can then type 'disconnect'

If the session isn't established yet, you need to either cancel it or let it
time out.

LVL 23

Expert Comment

ID: 22746911
Break'ing  may not work to escape the telnet.
You can set a different escape character on the vty line, with
for example "escape-character 27"   for the ESCAPE key.

But IOS still ignores the escape sequence while it is waiting to establish
a telnet connection  (or at least in the versions of IOS I can check)

Another possibility is to change the telnet timeout to a shorter duration
For example:
ip tcp synwait-time 10

This way your router waits 10 seconds before timing out new TCP
connections it initiates to other hosts; instead of 30 seconds.

Which makes the wait less unpleasant.


Author Comment

ID: 22761297
I still have not had any success. I tried several times
LVL 50

Expert Comment

by:Don Johnston
ID: 22762272
Can you please post the config of the 7604.

Author Comment

ID: 22762509
what do you need from the config?
LVL 23

Expert Comment

ID: 22763236
Please type  "show version"  on the 7604  and indicate what software version & hardware

Author Comment

ID: 22767561
Cisco Internetwork Operating System Software
IOS (tm) s3223_rp Software (s3223_rp-ADVIPSERVICESK9_WAN-M), Version 12.2(18)SXF15, RELEASE SOFTWARE (fc1)
Technical Support:
Copyright (c) 1986-2008 by cisco Systems, Inc.
Compiled Fri 29-Aug-08 19:09 by kellythw
Image text-base: 0x40101040, data-base: 0x42D700A0

ROM: System Bootstrap, Version 12.2(17r)SX3, RELEASE SOFTWARE (fc1)
BOOTLDR: s3223_rp Software (s3223_rp-ADVIPSERVICESK9_WAN-M), Version 12.2(18)SXF15, RELEASE SOFTWARE (fc1)

ROUTER1 uptime is 1 week, 10 hours, 11 minutes
Time since ONYXONTHEBAY.7604 switched to active is 1 week, 10 hours, 10 minutes
System returned to ROM by s/w reset (SP by power-on)
System restarted at 00:21:43 EST Tue Oct 14 2008
System image file is "sup-bootdisk:/s3223-advipservicesk9_wan-mz.122-18.SXF15.bin"

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:

If you require further assistance please contact us by sending email to

cisco CISCO7604 (R7000) processor (revision 2.0) with 458752K/65536K bytes of memory.
Processor board ID FOX11200JTC
R7000 CPU at 300Mhz, Implementation 0x27, Rev 3.3, 256KB L2, 1024KB L3 Cache
Last reset from power-on
SuperLAT software (copyright 1990 by Meridian Technology Corp).
X.25 software, Version 3.0.0.
Bridging software.
TN3270 Emulation software.
9 Virtual Ethernet/IEEE 802.3 interfaces
57 Gigabit Ethernet/IEEE 802.3 interfaces
1915K bytes of non-volatile configuration memory.

65536K bytes of Flash internal SIMM (Sector size 512K).
Configuration register is 0x2102
LVL 23

Accepted Solution

Mysidia earned 500 total points
ID: 22775991
How are you logged into the 7604?
Via a console cable connection, or via telnet?

How are you connecting to the 7604?
E.g. Are you SSH or Telnet'ing  into the 7604  and then attempting to connect

Or is your PC plugged into the 7604 console port with a serial cable?

Reason I ask, is..
I have tried testing  and noted:
Control+Shift+6  then x
_does_ work for me _perfectly_ while attempting to cancel telnet on a device running a 12.2  image, the telnet attempt cancels with a message  "Interrupted by user"

But there is one major caveat.
It only seems to work when consoled into the device telnet is being cancelled from.  (Using the serial cable  on a console port)
I essentially have a default line conf.

I can reproduce your description of it "not working"  if

I use a windows or Linux telnet program and connect to a device,
and from  that device  initiate the telnet command
Control+Shift+6 then x      
does not  seem to work  for cancelling the attempt; only for suspending
an established session.

While at the same time   Control+Shift+6     does the other things I expect it to do   (for example, no problems cancelling traceroutes or pings)

Possibly the device cares _how_ you are connecting to it.
I would suggest you try plugging in a serial port into the 7604 and verify
you can cancel telnet attempts initiated from the console  (if not already).

The only possible 'fix'  I can still suggest is:
conf t
ip tcp synwait-time 5

Which clearly must be done with care, if  the router is participating in any TCP-based protocols where a 5 second timeout would be undesirable.

Author Closing Comment

ID: 31507304
I was unable to fix my problem

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cisco  3750E switches 1 37
Cisco 887VA secondary outgoing IP Address diferent from Default Dialer 4 53
Edge switch problems cisco 2960 25 51
PowerShell and cisco ios 3 46
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question