==基礎設定==
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
sw02(config)#hostname sw02
sw02(config)#line console 0
sw02(config-line)#exec-timeout 0
sw02(config-line)#logging synchronous
sw02(config-line)#exit
sw02(config)#no ip domain-lookup
sw02(config)#interface vlan 1
sw02(config-if)#ip address 10.0.1.106 255.255.255.0
sw02(config-if)#no shutdown
00:19:32: %LINK-3-UPDOWN: Interface Vlan1, changed state to up
00:19:33: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
sw02(config-if)#exit
sw02(config)#line console 0
sw02(config-line)#password cisco
sw02(config-line)#login
sw02(config-line)#exit
sw02(config)#enable password cisco
sw02(config)#enable secret cisco3
sw02(config)#username ciscouser password ciscopassword
sw02(config)#ip domain-name www.cisco.com
sw02(config)#crypto key generate rsa
The name for the keys will be: sw02.www.cisco.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]: 1024
Generating RSA keys ...
[OK]
00:21:16: %SSH-5-ENABLED: SSH 1.99 has been enabled
sw02(config)#line vty 0 15
sw02(config-line)#login local
sw02(config-line)#transport input ssh
*VTY登入後,若沒看到一些訊息,可以啟用Terminal monitor
==清除舊有設定==
sw02#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
00:51:48: %SYS-7-NV_BLOCK_INIT: Initalized the geometry of nvram
sw02#delete vlan.dat
Banner設定
sw02(config)#banner login #
Enter TEXT message. End with the character '#'.
1234
5678
#
==密碼加密==
sw02#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
sw02(config)#service password-encryption
sw02#show running-config | begin line con 0
line con 0
password 7 045802150C2E
line vty 0 4
login
line vty 5 15
login
!
!
end
留言
張貼留言