一、实验需求:
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