Cấu hình Telnet & SSH cho Switch Cisco

 

Cấu hình Telnet & SSH cho Switch Cisco

Hi all,

Mình sẽ cùng các bạn cấu hình telnet và SSH cho Switch Cisco

I. Cấu hình Telnet cho Switch Cisco 

SW-Core#conf t

SW-Core(config)#line vty 05

SW-Core(config-line)#password yourpasswod

SW-Core(config-line)#login

11.png

Setup password Enable cho Switch Cisco

SW-Core#conf t

SW-Core(config)#enable password yourpasswod

11.png

11.png

II. Cấu hình SSH cho Switch Cisco 

1) Set the hostname and domain name

   switch# config t
   switch(config)# hostname OTGswitch
   OTGswitch(config)# ip domain-name OTG.com

2) Generate RSA keys for encryption

  OTGswitch(config)# crypto key generate rsa
  
  The name for the keys will be: OTGswitch.OTG.com
   Choose the size of the key modulus in the range of 360 to 2048 for your
     General Purpose Keys. Choosing a key modulus greater than 512 may take
     a few minutes.
  
  How many bits in the modulus [512]: 

Choose 1024 if you want higher security.

3) Configure VTYs (Virtual Terminal Lines)

  OTGswitch(config)# line vty 0 4
  OTGswitch(config-line)# login local
  OTGswitch(config-line)# transport input ssh
  OTGswitch(config-line)# exit

This means we will use local database on this switch for authentication and disable Telnet by specifying SSH only on VTYs 0 to 4.

If your device supports 16 VTYs amend the command as follows:

 
 OTGswitch(config)# line vty 0 15
 OTGswitch(config-line)# login local
 OTGswitch(config-line)# transport input ssh
 OTGswitch(config-line)# exit

4)Create an account

  OTGswitch(config)# username OTGuser privilege 15 secret OTGpass

Here username is OTGuser, password is OTGpass and privilege 15 means the user has full access rights.

5)Set time-out interval

  OTGswitch(config)# line vty 0 4
  OTGswitch(config-line)# exec-timeout 5

This sets a timeout interval of 5 minutes so your session expires in 5 minutes if you left it idle.

Chúc các bạn thao tác thành công ❤ ❤ ❤

Nhận xét

Bài đăng phổ biến từ blog này

Cisco - Hướng dẫn backup cấu hình Router cisco bằng cách sử dụng TFTP

Hướng dẫn cấu hình DMVPN trên Router Cisco