Cấu hình SSH cho switch cisco


Tạo mật khẩu enable:

#enable

#enable secret <PASSWORD>

#conf t

Gán địa chỉ IP quản trị và VLAN quản trị

config#ip default-gateway <FIREWALL INTERFACE IP ADDRESS>

config#interface vlan <MANAGEMENT VLAN ID>

config(int vlan id)#ip address <IP MANAGEMENT> <SUBNET MASK>

Cấu hình hostname và domain name.

config#hostname <HOSTNAME>

config#domain-name <tên gì đó ví dụ hostname.com>

gen key RSA cho SSH

ByteSoft(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]: 



mặc định 512, Chọn 1024 nếu thích bảo mật hơn

Bật SSH

ByteSoft(config)# line vty 0 4

ByteSoft(config-line)# login local

ByteSoft(config-line)# transport input ssh

ByteSoft(config-line)# exit

Tạo user để truy cập

ByteSoft(config)# username <Account name> privilege 15 secret <PASSWORD>

Lưu lại cấu hình

ByteSoft(config)# do wr