0x00:拿到設(shè)備Console線調(diào)試設(shè)備
console線:一頭連設(shè)備console口,一頭連電腦(現(xiàn)在的電腦基本上沒有RS232扣囊,需要用USB轉(zhuǎn)RS232線吉嫩,記得裝好驅(qū)動(dòng))
選好串口其掂,波特率:9600脖隶,數(shù)據(jù)位:8扁耐,停止位:1,其他:None
Switch>enable
Switch#configure terminal
Switch(config)#enable secret cisco #設(shè)置密碼
Switch(config)#hostname SW #設(shè)置主機(jī)名
0x01:配置SSH
首先配置管理地址
SW(config)#interface vlan 1
SW(config-if)#ip address 192.168.1.1 255.255.255.0
SW(config-if)#no shutdown
查看SSH狀態(tài)
SW#show ip ssh
SSH Disabled - version 1.99
%Please create RSA keys (of atleast 768 bits size) to enable SSH v2.
Authentication timeout: 120 secs; Authentication retries: 3
配置SSH
SW#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW(config)#ip ssh time-out 30 #設(shè)置超時(shí)秒數(shù)
SW(config)#ip ssh authentication-retries 3 #設(shè)置認(rèn)證次數(shù)
SW(config)#ip domain-name cisco.com #設(shè)置域名
SW(config)#crypto key generate rsa #生成RSA密鑰
The name for the keys will be: SW.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]: 2048 #指定2048位
% Generating 2048 bit RSA keys, keys will be non-exportable...[OK]
SW(config)#username ssh secret cisco #設(shè)置用戶名密碼
SW(config)#line vty 0 4
SW(config-line)#transport input ssh #設(shè)置SSH登錄
SW(config-line)#login local
查看SSH狀態(tài)
SW#show ip ssh
SSH Enabled - version 1.99
Authentication timeout: 30 secs; Authentication retries: 3
SW#
SSH配置完成产阱,直接使用就可以了婉称。
0x02:配置Telnet(不推薦使用)
Switch>enable
Switch#configure terminal
Switch(config)#enable secret cisco
Switch(config)#hostname SW
SW(config)#username telnet secret telnet
SW(config)#line vty 0 4
SW(config-line)#login