To clear a vty line (telnet/ssh) connection on a cisco device you have to know, how to interpret the ‘sh line’ output.
To show the line output you can choose the following line-commands.
With the ‘sh whoami’ command you can see on which vty line you are connected.
I’ am connected on Line 2.
With the ‘sh users’ command you see, that i was connected at Line 2 vty.
The asterisk in front of the line show the active line.
With the ‘sh line’ command you see all active and passive lines. The output shows all type of possible
- If you want to clear line 3 vty, you have to execute the following command.
CAT_6500#clear line vty 2.
The Tty column begin at vty with the digit 1 to 16.
But the clear line vty command begins from 0 to 15.
Clearing line 3 vty -> choose ‘clear line vty 2′