华为设备SSH远程访问配置实验简述

一、实验需求:
1、AR1模拟电脑SSH 访问AR2路由器。

二、实验步骤:
1、AR1和AR2接口配置IP,实现链路通信。
2、AR2配置AAA模式
配置用户及密码
配置用户访问级别
配置用户SSH 访问服务
AR2配置远程服务数量
配置用户远程访问模式为AAA
配置允许登录接入用户类型的协议为SSH。
3、AR1 Stelnet AR2,实验成功

三、实验图例
在这里插入图片描述

四、AR1命令
AR1:

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1

[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
[AR1-GigabitEthernet0/0/0]quit

[AR1]stelnet 12.0.0.2
Please input the username:yao
Trying 12.0.0.2 …
Press CTRL+K to abort
Connected to 12.0.0.2 …
Error: Failed to verify the server’s public key.
Please run the command "ssh client first-time enable"to enable the first-time ac
cess function and try again.

[AR1]ssh client first-time enable

[AR1]stelnet 12.0.0.2
Please input the username:yao
Trying 12.0.0.2 …
Press CTRL+K to abort
Connected to 12.0.0.2 …
Enter password:
User last login information:
Access Type: SSH
IP-Address : 12.0.0.1 ssh
Time : 2024-06-20 21:09:18-08:00

五、AR2命令
AR2:
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2
[AR2]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip add 12.0.0.2 24

[AR2]stelnet server enable
Info: Succeeded in starting the STELNET server.
[AR2]aaa
[AR2-aaa]local-user yao password cipher a1234567
Info: Add a new user.
[AR2-aaa]local-user yao privilege level 15

[AR2-aaa]local-user yao service-type ssh
[AR2-aaa]quit

[AR2]user-interface vty 0 4

[AR2-ui-vty0-4]authentication-mode aaa

[AR2-ui-vty0-4]protocol inbound ssh
[AR2-ui-vty0-4]quit
[AR2]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated

  • 24
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值