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

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

Delete VTY lines

I have configured VTY lines on L3 switch like this --

line vty 0 3

line vty 5 14

line vty 15

When I am giving any of the command like -

no line vty 15


no line vty 5

it results ----

% Can't delete last 16 VTY lines

I want only line vty 0 4 on this L3 2850 switch, How to do ?

Thanks in advance

Neeraj Jagetia


Re: Delete VTY lines


if u delete the vty lines it doesnt show or give any output it just returns to the # prompt simply.

you can always check the same by issuing show run.

that will show the exact o/p without the deleted vty lines.

if u have something like this line vty 5 15 then simply give no line vty 5 15 .

then check ur config whether thats removed or not.

hope this helps....


Re: Delete VTY lines

Did you mean the 2950 switch or the 2851 ISR Router? Visit for information and examples on configuring for telnet access.

I am not sure you can 'delete' specific VTY lines, perhaps someone could shed some light on this. I did, however, come across an interesting option to Telnet to a specific line on a router/switch. Apparently when using the Telnet protocol, the remote host connects to the TCP port numbered 3000 plus the rotary group number. If the rotary group identifier is 25, the corresponding TCP port is 3025 that you will telnet to:

line vty 4

password iwannacomein


rotary 25

And in use:

telnet {destination ip number here} 3025

The alternative would be to limit access to the device usign an Access List (always a good idea) then it wouldn't matter who came in on which line.

Why do you want to have only lines 0 to 4 on this switch?


New Member

Re: Delete VTY lines

Dear Josef hello.

I have L3 that is WS-C3750-24.

I do not want the help regarding telnet. I am able to delete vty lines in router like 1841, 2611, 3845 but I am not able to these lines in this L3-Switch

I want only 0 to 4 lines with ACL which I have done and rest I want to delete.

Thanks and regards.


New Member

Re: Delete VTY lines

Hello Spremkumar

But it shows that message.

Although I have tried to delete the vty lines in router 1841, 2611, 3845, I have never received like this.

and as far as the show conf concern, i have checked that, no changes are ther lines still exists.

Thanks and regards

Hall of Fame Super Silver

Re: Delete VTY lines


I believe that you can not delete the default VTY lines. In many versions of IOS the default was to have 5 VTY lines (line vty 0 4 is 5 VTY lines). Now in some versions of IOS the default is 16 VTY lines (line vty 0 15 is 16 VTYs). And in your version of IOS you can not delete the default VTY lines. But if you want to prevent them from being used there is a simple and effective solution. Configure this:

line vty 5 15

no exec

This will prevent any exec process starting on these lines and will prevent any access to them.



New Member

Re: Delete VTY lines

Dear Rick

I know how to prevent these line, that is transport input none.

but problem is I do not want these in my switch.


Re: Delete VTY lines


As already pointed out by Rick, you cannot delete defualt VTY lines. This is an IOS limitaion, you cannot delete the defualt VTY lines.


-amit singh

CreatePlease login to create content