<Huawei>sy Enter system view, return user view with Ctrl+Z. [Huawei]sy R2 [R2]int g0/0/0 [R2-GigabitEthernet0/0/0]ip add 34.1.1.2 24 [R2-GigabitEthernet0/0/0] [R2-GigabitEthernet0/0/0]q [R2]telnet server enable Error: TELNET server has been enabled [R2]user-interface vt [R2]user-interface vty 0 4 [R2-ui-vty0-4]protocol inbound telnet [R2-ui-vty0-4]display this [V200R003C00] # user-interface con 0 authentication-mode password user-interface vty 0 4 user-interface vty 16 20 # return [R2-ui-vty0-4]authentication-mode ? aaa AAA authentication password Authentication through the password of a user terminal interface [R2-ui-vty0-4]authentication-mode password ? <cr> Please press ENTER to execute command [R2-ui-vty0-4]authentication-mode password Please configure the login password (maximum length 16):123456 [R2-ui-vty0-4]user privilege ? level Set the login priority of a user terminal [R2-ui-vty0-4]user privilege level ? INTEGER<0-15> Set a priority, the default value is 0 [R2-ui-vty0-4]user privilege level 15 [R2-ui-vty0-4]
R1
<Huawei>sy Enter system view, return user view with Ctrl+Z. [Huawei]sy R1 [R1]int g0/0/0 [R1-GigabitEthernet0/0/0]ip add 34.1.1.1 24 Dec 21 2023 11:45:03-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. [R1-GigabitEthernet0/0/0]q [R1]q <R1>telnet 34.1.1.2 Press CTRL_] to quit telnet mode Trying 34.1.1.2 ... Connected to 34.1.1.2 ...
<Huawei>sy Enter system view, return user view with Ctrl+Z. [Huawei]sy SSH_SERVER [SSH_SERVER]int g0/0/0 [SSH_SERVER-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[SSH_SERVER]stelnet server enable Info: Succeeded in starting the STELNET server. [SSH_SERVER]
[SSH_SERVER]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 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 Generating keys... ...................++++++ ..........................++++++ .............++++++++ .++++++++ [SSH_SERVER]
R1
<Huawei>sy Enter system view, return user view with Ctrl+Z. [Huawei] sy PC [PC]int g0/0/0 [PC-GigabitEthernet0/0/0]ip add 12.1.1.1 24 [PC] [PC]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 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 Generating keys... .++++++ ........++++++ ......++++++++ ......................++++++++
[PC] [PC]ssh client first-time enable
[PC]stelnet 12.1.1.2 Please input the username:sshuser 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 Dec 21 2023 15:02:27-08:00 PC %%01SSH/4/CONTINUE_KEYEXCHANGE(l)[0]:The server ha d not been authenticated in the process of exchanging keys. When deciding whethe r to continue, the user chose Y. [PC] 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...
Dec 21 2023 15:02:32-08:00 PC %%01SSH/4/SAVE_PUBLICKEY(l)[1]:When deciding wheth er to save the server's public key 12.1.1.2, the user chose Y. [PC] Enter password: <SSH_SERVER>