欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

华为stelnet实验

程序员文章站 2022-07-02 21:49:57
...

华为stelnet实验

1、实验拓扑

AR1作为客户机,AR2作为服务器
华为stelnet实验

2、服务器配置

<Huawei>sys
[Huawei]sysname AR2
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[AR2]display rsa local-key-pair public   #在服务器上生成本地**对
[AR2]user-interface vty 0 4
[AR2-ui-vty0-4]authentication-mode aaa   #指定用户认证模式
[AR2-ui-vty0-4]protocol inbound ssh      #配置vty用户只支持ssh协议
[AR2-ui-vty0-4]quit
[AR2]aaa          #进入aaa视图
[AR2-aaa]local-user huawei password cipher aaa@qq.com  #配置本地用户和密码
[AR2-aaa]local-user huawei service-type ssh         #配置本地用户的接入类型
[AR2-aaa]local-user huawei privilege level 15       #配置本地用户的级别
[AR2]ssh user huawei authentication-type password   #配置ssh用户的认证方式
[AR2]stelnet server enable   #开启ssh功能(在ssh服务器使能stelnet服务器功能)

3、客户机配置

<Huawei>sys
[Huawei]sysname AR1
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[AR1-GigabitEthernet0/0/0]quit
[AR1]ssh client first-time enable  #**ssh客户端首次认证功能

4、验证结果

[AR1]stelnet 12.1.1.2
Please input the username:huawei
Trying 12.1.1.2 ...
Press CTRL+K to abort
Connected to 12.1.1.2 ...
The server is not authenticated. Continue to access it? (y/n)[n]:y
Apr  4 2020 12:34:20-08:00 AR1 %%01SSH/4/CONTINUE_KEYEXCHANGE(l)[1]:The server h
ad not been authenticated in the process of exchanging keys. When deciding wheth
er to continue, the user chose Y. 
[AR1]
Save the server's public key? (y/n)[n]:y
The server's public key will be saved with the name 12.1.1.2. Please wait...

Apr  4 2020 12:34:21-08:00 AR1 %%01SSH/4/SAVE_PUBLICKEY(l)[2]:When deciding whet
her to save the server's public key 12.1.1.2, the user chose Y. 
[AR1]
Enter password:
<AR2>sys
Enter system view, return user view with Ctrl+Z.
[AR2]
相关标签: 数通 ssh 网络