How to disconnect a telnet user from a switch

Unanswered Question
May 22nd, 2008

Hi

I've run out of telnet sessions that I can use to connect to a 3560 switch. When I run "show users" I get:

#sh users

Line User Host(s) Idle Location

1 vty 0 idle 1d21h 10.11.11.29

2 vty 1 idle 04:00:01 10.11.11.29

3 vty 2 10.11.3.2 00:00:00 10.11.11.29

4 vty 3 10.11.3.5 00:00:00 10.11.11.2

* 5 vty 4 idle 00:00:00 10.11.3.5

Interface User Mode Idle Peer Address

How do I disconnect these users. I've tried disconnect but I think I'm getting the syntax wrong given the above information. An exmplae with the above results included would be good.

Thanks in advance

Dan

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
philiechang Thu, 05/22/2008 - 07:33

Clear line vty x, where x is the number on the right of vty. Here's an example:

RT-3825#clear line vty 0

[confirm]

[OK]

dan_track Thu, 05/22/2008 - 07:59

Thanks for that.

Why doesn't the disconnect command work?

Dan

philiechang Thu, 05/22/2008 - 08:24

The disconnect command is used to disconnect your current connections to various terminal connections when you use an async/term server.

Here's an example:

SF-TERMSVR-1#disconnect

Closing connection to INTERNET-1 [confirm]

SF-TERMSVR-1#

Joseph W. Doherty Fri, 05/23/2008 - 03:35

Another poster has provided how to clear the vty line, but you might also want to consider how to minimize this situation arising. Often, Cisco devices can enable idle session timers and/or TCP keepalives.

kstiver Fri, 05/23/2008 - 03:54

I have the same problem on a 3560 switch, because I did not have the 'session-timeout' configured on the vty line. Now the problem is that the 'clear line vty 3' is not disconnecting the session. Any ideas?

Thanks,

Richard Burts Fri, 05/23/2008 - 11:07

Kevin

Is it possible that there is confusion about the line number and the vty line number? If you do a show line it will show the line numbers which are different from vty 0, 1, etc.

So which number did you use when you attempted the clear line? And did you do clear line or did you do clear line vty ?

Perhaps it would help us to understand the issue and to give better advice if you would post the output of show line, and the command that you attempted to clear the vty.

HTH

Rick

kstiver Sat, 05/24/2008 - 06:16

Yes, I can see that there is a difference between the line # and the vty #. Following this output of 'who':

Line User Host(s) Idle Location

14 vty 13 idle 6w1d ###.###.###.###

I would enter the command:

clear line vty 13, or

clear line 14

neither being effective.

Thanks.

(ultimately I rebooted the switch, because I couldn't wait for another solution...but I'd still like to know what went wrong, for future reference...)

(This is no

Actions

This Discussion