路由器 telnet配置

编程知识 更新时间:2023-04-14 20:12:44

路由器 telnet配置

基于password 的远程登录

R1

<R1>system-view 
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.12.1 24
[R1-GigabitEthernet0/0/0]q
[R1]telnet server enable      # 开启telnet
Info: The Telnet server has been enabled.
[R1]user-interface vty 0 4    # 进入用户虚拟模板
[R1-ui-vty0-4]authentication-mode password  # 配置认证方式
[R1-ui-vty0-4]set authentication password cipher 123456  # 配置密码为密文传输
[R1-ui-vty0-4]user privilege level 3    # 定义用户权限级别为3级
[R1-ui-vty0-4]protocol inbound telnet   # 使用telnet 协议远程登录访问
                   # 这里可以配置为 ssh 或 telnet 或者all(ssh and telnet)

R2

在 R2 上主要是验证 telnet 远程连接

<R2>system-view 
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.0.12.2 24
[R2-GigabitEthernet0/0/0]q
[R2]q     # 要退出到用户视图才能使用 telnet 远程登录到其它设备
<R2>telnet 10.0.12.1
Trying 10.0.12.1 ...
Press CTRL+K to abort
Connected to 10.0.12.1 ...


Login authentication


Password:
Info: The max number of VTY users is 10, and the number
      of current VTY users on line is 1.
      The current login time is 2021-05-13 14:10:51.
<R1>

基于aaa 的远程登录

R3

<Huawei>system-view
[Huawei]sysname R3
[R3]
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.0.34.3 24
[R3-GigabitEthernet0/0/0]q
[R3]
[R3]telnet server enable 
[R3]user-interface vty 0 4
[R3-ui-vty0-4]authentication-mode aaa  # 配置认证方式为aaa 认证
[R3-ui-vty0-4]protocol inbound telnet 
[R3-ui-vty0-4]q
[R3]
[R3]aaa    # 进入 aaa 视图
[R3-aaa]local-user test password cipher 123456
[R3-aaa]local-user  test service-type telnet
[R3-aaa]q
[R3]

R4

在R4 上面验证 telnet aaa 验证方式是否成功。

<Huawei>system-view 
[Huawei]sysname R4
[R4]
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address 10.0.34.4 24
[R4-GigabitEthernet0/0/0]ping 10.0.34.3    # 连通性测试
  PING 10.0.34.3: 56  data bytes, press CTRL_C to break
    Reply from 10.0.34.3: bytes=56 Sequence=1 ttl=255 time=30 ms
May 13 2021 14:19:02-08:00 R4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 2, the ch
ange loop count is 0, and the maximum number of records is 4095.
    Reply from 10.0.34.3: bytes=56 Sequence=2 ttl=255 time=10 ms
    Reply from 10.0.34.3: bytes=56 Sequence=3 ttl=255 time=50 ms
    Reply from 10.0.34.3: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 10.0.34.3: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 10.0.34.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/30/50 ms

[R4-GigabitEthernet0/0/0]q
[R4]q
<R4>
<R4>telnet 10.0.34.3
Trying 10.0.34.3 ...
Press CTRL+K to abort
Connected to 10.0.34.3 ...


Login authentication


Username:test
Password:
Info: The max number of VTY users is 10, and the number
      of current VTY users on line is 1.
      The current login time is 2021-05-13 14:29:06.
<R3>
<R3>
<R3>
<R3>
<R3>q
<R4>

更多推荐

路由器 telnet配置

本文发布于:2023-04-12 06:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/62dee8900ac6e90380f749051435e090.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:路由器   telnet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 69631文章数
  • 14阅读数
  • 0评论数