To clear a vty (telnet / ssh) connection on a Cisco router you have to clear the
specific line.
To find this line you can use the following commands:
In the example bellow a router has a vty connection from a host with ip
10.10.10.1 on line 130:
router2#who
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
130 vty 0 idle 00:02:07 10.10.10.1
Interface User Mode Idle Peer Address
router2#
router2#
router2#sh line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY - - - - - 0 0 0/0 -
129 AUX 9600/9600 - - - - - 0 0 0/0 -
* 130 VTY - - - - - 1 0 0/0 -
131 VTY - - - - - 0 0 0/0 -
132 VTY - - - - - 0 0 0/0 -
133 VTY - - - - - 0 0 0/0 -
134 VTY - - - - - 0 0 0/0 -
Line(s) not in async mode -or- with no hardware support:
1-128
To clear this connection on line 130 use the command clear line:
router2#clear line 130
[confirm]
[OK]
router2#
|