<Huawei> 用户视图
# 进入系统
<Huawei>system-view
[Huawei]
# 修改主机名
[Huawei]sysname AR3
[AR3]
# 查看当前接口进程的配置
[AR3-GigabitEthernet0/0/0]display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
ip address 192.47.1.254 255.255.255.0
#
return
[AR3-GigabitEthernet0/0/0]
# 删除接口IP配置
[AR3-GigabitEthernet0/0/0]undo ip address 192.47.1.254 24
Mar 16 2023 14:14:04-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the DOWN state.
[AR3-GigabitEthernet0/0/0]
# 查看当前设备的所有配置
[AR3]display current-configuration
远程登录:【AR1登录AR2】
# 1.设置能够通信
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]ip ad
[AR1-GigabitEthernet0/0/0]ip address 12.47.1.1 24
[AR1-GigabitEthernet0/0/0]
Mar 16 2023 15:28:23-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[AR1-GigabitEthernet0/0/0]quit
[AR1]
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip ad
[AR2-GigabitEthernet0/0/0]ip address 12.47.1.2 24
Mar 16 2023 15:28:57-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[AR2-GigabitEthernet0/0/0]quit
[AR2]
# 进行测试通信
[AR2]ping 12.47.1.1
PING 12.47.1.1: 56 data bytes, press CTRL_C to break
Reply from 12.47.1.1: bytes=56 Sequence=1 ttl=255 time=210 ms
Reply from 12.47.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 12.47.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 12.47.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 12.47.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 12.47.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/64/210 ms
[AR2]
# 2.设置登录
[AR2]aaa
[AR2-aaa]local-user wdj-47 password cipher 123456 # cipher表示密文
Info: Add a new user.
[AR2-aaa]
[AR2-aaa]local-user wdj-47 service-type telnet # 表示为此用户设置telnet登录
[AR2-aaa]quit
[AR2]
[AR2]user-interface vty 0 4
[AR2-ui-vty0-4]authentication-mode aaa
# 3.进行登录
<AR1>telnet 12.47.1.2
Press CTRL_] to quit telnet mode
Trying 12.47.1.2 ...
Connected to 12.47.1.2 ...
Login authentication
Username:wdj-47
Password:
<AR2> # 现在的权限是属于0级
[AR2-aaa]local-user wdj-47 privilege level 15
[AR2]aaa
[AR2-aaa]local-user 47-wdj password cipher 123456
Info: Add a new user.
[AR2-aaa]
[AR2-aaa]local-user 47-wdj service-type ssh
[AR2-aaa]local-user 47-wdj privilege level 10
[AR2-aaa]quit
[AR2]stelnet server enable
Info: Succeeded in starting the STELNET server.
[AR2]user-interface vty 0 4
[AR2-ui-vty0-4]protocol inbound ssh
[AR2-ui-vty0-4]quit
# 进行加密 (把密码进行加密)-----------------------------------
[AR2]ssh user 47-wdj authentication-type password
Authentication type setted, and will be in effect next time
[AR2] #rsa加密-------------------------------------------------
[AR2]rsa local-key-pair create
The key name will be: Host
% RSA keys defined for Host already exist.
Confirm to replace them? (y/n)[n]:y # 输入y确定
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]:1024 # 默认不写为加密512可以指定
Generating keys...
.........++++++
..........++++++
.......++++++++
.....++++++++
[AR2]
# 进行验证---------------------------------------------------
[AR1]ssh client first-time enable # 登录者设置
[AR1]stelnet 12.47.1.2
Please input the username:47-wdj
Trying 12.47.1.2 ...
Press CTRL+K to abort
Connected to 12.47.1.2 ...
The server is not authenticated. Continue to access it? (y/n)[n]:y
Mar 21 2023 14:22:10-08:00 AR1 %%01SSH/4/CONTINUE_KEYEXCHANGE(l)[2]: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.47.1.2. Please wait...
Mar 21 2023 14:22:11-08:00 AR1 %%01SSH/4/SAVE_PUBLICKEY(l)[3]:When deciding whet
her to save the server's public key 12.47.1.2, the user chose Y.
[AR1]
Enter password:
<AR2>