A-A+

思科路由器登陆模式:Console端口线路配置、虚拟终端线路配置和S

2015年11月18日 站长资讯 暂无评论

针对最常见的思科(cisco)企业级路由器产品,下文将介绍其登录模式。包括Console端口线路配置、虚拟终端线路配置和使用SSL协议登录的方法。登陆过程中,需要配置域名并且开启SSH功能,也需要配置密钥长度和创建账户,最后有登陆成功之后的截图。

Console端口线路配置:

  1. Router(config)#hostname R1
  2. R1(config)#int f0/0
  3. R1(config-if)#ip add 192.168.1.254 255.255.255.0
  4. R1(config-if)#no shut
  5. %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
  6. %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
  7. R1(config)#line con  0
  8. R1(config-line)#pass
  9. R1(config-line)#password 12346
  10. R1(config-line)#login
  11. R1(config-line)#logg syn //光标同步
  12. R1(config-line)#exec-timeout 0 0 //永远不超时
  13. R1(config-line)#exit

虚拟终端线路配置:

  1. R1(config)#line vty 0 4
  2. R1(config-line)#password cisco
  3. R1(config-line)#login
  4. R1(config-line)#exit
  5. R1(config)#username admin password cisco
  6. R1#wri
  7. Building configuration...
  8. [OK]
  9. R1#reload

使用SSL协议登录:

  1. R1(config)#ip domain-name abc.com  //配置域名
  2. R1(config)#crypto key generate rsa //开启SSH功能
  3. The name for the keys will be: R1.abc.com
  4. Choose the size of the key modulus in the range of 360 to 2048 for your
  5.   General Purpose Keys. Choosing a key modulus greater than 512 may take
  6.   a few minutes.
  7. How many bits in the modulus [512]:  //配置密钥长度
  8. % Generating 512 bit RSA keys, keys will be non-exportable...[OK]
  9. R1(config)#user
  10. *?? 1 0:7:39.609:  RSA key size needs to be at least 768 bits for ssh version 2
  11. *?? 1 0:7:39.609:  %SSH-5-ENABLED: SSH 1.5 has been enabled
  12. R1(config)#username admin secret cisco  //创建账户
  13. ERROR: Can not have both a user password and a user secret.
  14. Please choose one or the other.
  15. R1(config)#line vty 0 4
  16. R1(config-line)#transport input all
  17. R1(config-line)#login

登录如图所示:

标签:

给我留言