How to kill a zombie ssh session on a router.

Discussion in 'Cisco' started by AM, Jan 11, 2005.

  1. AM

    AM Guest

    I contact my router in 2 steps (first to another and then to my 837)
    I lost my connection to the 1st router so I lost my connection to 837, but it is still active.
    How can I kill the unused session?

    Alex.
     
    AM, Jan 11, 2005
    #1
    1. Advertisements

  2. I contact my router in 2 steps (first to another and then to my 837)

    clear session [session id]
     
    Helmut Ulrich, Jan 11, 2005
    #2
    1. Advertisements

  3. AM

    steran Guest

    Log into your router and do a 'who' or 'sh user'. You should see
    something like this:

    router#who
    Line User Host(s) Idle Location
    * 1 vty 0 idle 00:00:00 10.43.1.39
    2 vty 1 idle 00:00:03 10.10.51.91

    Interface User Mode Idle Peer
    Address

    Find the line you want to kill (let's assume VTY 1) and enter:

    router#cle line vty 1

    or

    router#cle line 2

    If you don't have it setup already, you should consider adding an
    exec-timeout to your VTY lines to clear idle sessions after x minutes.
    To enable a 5 minute exec-timeout:

    router(config-line)#exec-time 5 0

    Adding a keepalive to should also clear up any hung sessions (with
    varying degrees of success):
    router(config)#service tcp-keepalives-in


    Cheers,
    Spencer Teran
     
    steran, Jan 12, 2005
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.