A-A+
思科路由器登陆模式:Console端口线路配置、虚拟终端线路配置和S
针对最常见的思科(cisco)企业级路由器产品,下文将介绍其登录模式。包括Console端口线路配置、虚拟终端线路配置和使用SSL协议登录的方法。登陆过程中,需要配置域名并且开启SSH功能,也需要配置密钥长度和创建账户,最后有登陆成功之后的截图。
Console端口线路配置:
- Router(config)#hostname R1
- R1(config)#int f0/0
- R1(config-if)#ip add 192.168.1.254 255.255.255.0
- R1(config-if)#no shut
- %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
- %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
- R1(config)#line con 0
- R1(config-line)#pass
- R1(config-line)#password 12346
- R1(config-line)#login
- R1(config-line)#logg syn //光标同步
- R1(config-line)#exec-timeout 0 0 //永远不超时
- R1(config-line)#exit
虚拟终端线路配置:
- R1(config)#line vty 0 4
- R1(config-line)#password cisco
- R1(config-line)#login
- R1(config-line)#exit
- R1(config)#username admin password cisco
- R1#wri
- Building configuration...
- [OK]
- R1#reload
使用SSL协议登录:
- R1(config)#ip domain-name abc.com //配置域名
- R1(config)#crypto key generate rsa //开启SSH功能
- The name for the keys will be: R1.abc.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]: //配置密钥长度
- % Generating 512 bit RSA keys, keys will be non-exportable...[OK]
- R1(config)#user
- *?? 1 0:7:39.609: RSA key size needs to be at least 768 bits for ssh version 2
- *?? 1 0:7:39.609: %SSH-5-ENABLED: SSH 1.5 has been enabled
- R1(config)#username admin secret cisco //创建账户
- ERROR: Can not have both a user password and a user secret.
- Please choose one or the other.
- R1(config)#line vty 0 4
- R1(config-line)#transport input all
- R1(config-line)#login
登录如图所示: