Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

How to disconnect a telnet user from a switch

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

7 REPLIES
New Member

Re: How to disconnect a telnet user from a switch

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]

New Member

Re: How to disconnect a telnet user from a switch

Thanks for that.

Why doesn't the disconnect command work?

Dan

New Member

Re: How to disconnect a telnet user from a switch

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#

Super Bronze

Re: How to disconnect a telnet user from a switch

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.

New Member

Re: How to disconnect a telnet user from a switch

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,

Hall of Fame Super Silver

Re: How to disconnect a telnet user from a switch

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

New Member

Re: How to disconnect a telnet user from a switch

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

13548
Views
5
Helpful
7
Replies