How to disconnect idle user on vty line?

After running the 'show users' command in the Cisco IOS, it appears on one of our Cisco 3560 switches, I have a user who has been idle on 'vty 0' for many weeks (we don't reload the switches often).  What command can I run to disconnect them? I am currently logged in over telnet to vty1 - they are connected to vty 0
LVL 1
davisAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
rfc1180Connect With a Mentor Commented:
try:

clear line 0
0
 
luc_royCommented:
disconnect [session number]
0
 
luc_royConnect With a Mentor Commented:
sorry that is for suspended session

clear line vty [#]

will kick the user out.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
davisAuthor Commented:
luc roy - What do you mean by suspended session?  I am not sure if I have a 'suspended' or 'idle' session?  
0
 
luc_royCommented:
clear line vty [#]
 will do it without haveing to first suspend it
0
 
rfc1180Commented:
as I stated in the begging:

edge01.lax01#show user
*Aug 21 16:22:18.959: %SYS-5-CONFIG_I: Configured from console by console
    Line       User       Host(s)              Idle       Location
*  0 con 0                idle                 00:00:00  
   2 vty 0                idle                 00:00:04 192.168.1.30

  Interface    User               Mode         Idle     Peer Address

edge01.lax01#clear line 2
[confirm]
 [OK]
edge01.lax01#show user
    Line       User       Host(s)              Idle       Location
*  0 con 0                idle                 00:00:00  

  Interface    User               Mode         Idle     Peer Address
0
 
davisAuthor Commented:
worked perfectly - thanks!
0
 
rfc1180Commented:
just to add, luc roy provides a better solution as the VTY is the correct method for telnet/ssh sessions. I have just always used clear line # as it has always worked in the past. clear line # may not work on all versions, as it honestly applies to async lines.

Billy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.