路由器 telnet配置

路由器 telnet配置

基于password 的远程登录

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 的远程登录

telnet-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>
  • 9
    点赞
  • 46
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飘雪冰峰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值