cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
25740
Views
4
Helpful
12
Replies

how to shut vty 5 15

abhishekm4u
Level 1
Level 1

how we can shutdown the vty 5 to 15 on a router or L3 switch. any command ??

1 Accepted Solution

Accepted Solutions

Hi,

For some platforms (for example the 3560 switches) you can't remove any of the 16 VTYs (0-15), as a work around you can disable these lines via "no exec".

BR,

Mohammed Mahmoud.

View solution in original post

12 Replies 12

Goutam Sanyal
Level 4
Level 4

Hi Abhi,

The basic is use "no" to decline any command to a Cisco router.

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#line 5 15

No physical hardware support for line 5

Router(config)#no login

Thanks & Regards

Goutam

Pls rate if it works

mohammedmahmoud
Level 11
Level 11

Hi,

Kindly use "no line vty 5 15".

[edit] Goutam, the login command is used to enable password checking, using "no login" tells the router not to enable password checking on this line and to grant anyone access on this line without a password check.

BR,

Mohammed Mahmoud.

hi ,

both commands not working

no line vty 5 15 shows below error and no login shows incomplete command.

kindly guide !

Enter configuration commands, one per line. End with CNTL/Z.

RJ-JPR-GUM-R1-64-6(config)#no line

RJ-JPR-GUM-R1-64-6(config)#no line vt

RJ-JPR-GUM-R1-64-6(config)#no line vty 5 15

% Can't delete last 16 VTY lines

RJ-JPR-GUM-R1-64-6(config)#line vt

RJ-JPR-GUM-R1-64-6(config)#line vty 5 15

RJ-JPR-GUM-R1-64(config-line)#no lo

RJ-JPR-GUM-R1-64(config-line)#no logi

RJ-JPR-GUM-R1-64(config-line)#no login

% Incomplete command.

HI

Can u try no line vty 4 15

Thanks

Mahmood

Hi,

For some platforms (for example the 3560 switches) you can't remove any of the 16 VTYs (0-15), as a work around you can disable these lines via "no exec".

BR,

Mohammed Mahmoud.

Hi Mahmood,

 

I have shutdown a telnet connection to a remote router, however on the remote shows that the connection is still active but idle. How to shutdown this connection?

 

Dear Jason, 

following commands will be used:

  • show user
  • clear line <line number> / clear line vty <vty line number>

Capture 4.JPG

using capture above where we see output of command "show user" we see <line number> as 866, 867 and  <vty line number> as 0,1 

so for same user to be disconnected command will be

clear line 867  or clear line vty 1

 

 

Hi,

Router# conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#no line vty 5 15

Router(config)#

Its work and no need to put the command "no login"

With ur out-put is showing that 1s u disable the line & after u enableing it again.

Router(config)#no line vty 5 ?

<6-15> Last Line number

Goutam

pls rate if it works

Hi,

Yes. We can delete unnecessary line vty.

regards

skrao

Hi Mohammed,

Thanks to rectify me :-)

abhishekm4u
Level 1
Level 1

issue resovled by command no exec .

thanks mohd & gautam !!

Aydin Ehtibarov
Level 1
Level 1

following command can be used if line 5 15 cannot be deleted using command "no line vty 5 15"

 

   line vty 5 15 

   transport input none 

as the result when you will try to connect router will just close connection without negotiating any parameter 

 

 

if you use commend 

   line vty 5 15 

   no exec

again access to router on those lines will not be possible but this time connection will be closed after ssh parameter negotiation 

 

additional note: in both solution cases it will not prevent reverse telnet to aux port when lines 0 4 are busy . 

 

Review Cisco Networking for a $25 gift card