华为基础试验

华为基础试验_第1张图片

R1:gigabitEthernet0/0/0:12.1.1.1/24

R2:gigabitEthernet0/0/0:12.1.1.2/24

system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
Mar  5 2018 23:19:13-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]quit


R2配置:
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]
Mar  5 2018 23:18:46-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEt
hernet0/0/0 has turned into UP state.
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[R2-GigabitEthernet0/0/0]
Mar  5 2018 23:19:29-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]quit
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode password ——启用线下密码认证
Please configure the login password (maximum length 16):huawei
——手动输入密码,(set authentication password cipher cisco  手工输入密码)

[R2-ui-vty0-4]user privilege level 15 ——设置权限等级为15

[R2-ui-vty0-4]protocol inbound telnet

[R2-ui-vty0-4]quit
[R2]


R1连接R2:
telnet 12.1.1.2
  Press CTRL_] to quit telnet mode
  Trying 12.1.1.2 ...

  Connected to 12.1.1.2 ...



试验2:

AAA认证(取消所有配置)
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa ——启用AAA认证
[R1-ui-vty0-4]quit 
[R1]aaa
[R1-aaa]local-user admin privilege level 15 password cipher huawei
[R1-aaa]local-user admin service-type telnet          ——针对telnet做认证
[R1-aaa]quit
[R1]

R2连接R1
telnet 12.1.1.1
  Press CTRL_] to quit telnet mode
  Trying 12.1.1.1 ...
  Connected to 12.1.1.1 ...

Login authentication

Username:admin            ——输入账户
Password:                        ——输入密码


SSH登陆:

[R2]rsa local-key-paircreate                ——生成加密随机数

The key name will be:Host

% RSA keys defined forHost already exist.

Confirm to replace them?(y/n)[n]:y

The range of public keysize is (512 ~ 2048).            ——随机数取值范围512-2048

NOTES: If the keymodulus is greater than 512,

       It will take a few minutes.

Input the bits in themodulus[default = 512]:1024

Generating keys...

.................................++++++

......++++++

..............++++++++

......................++++++++

 

[R2]user-interface vty 0 4                                        

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

[R2-ui-vty0-4]protocol inbound ssh                ——只允许SSH连接

[R2-ui-vty0-4]quit

[R2]aaa

[R2-aaa]local-user adminprivilege level 15 password cipher huawei

[R2-aaa]local-user adminservice-type ssh

[R2-aaa]quit

[R2]stelnet server enable        ——开启ssh,允许被ssh连接

Info: Succeeded instarting the STELNET server.

 

 

 

 

[R1]ssh clientfirst-time enable          ——允许ssh作为客户端

[R1]stelnet 12.1.1.2

Please input theusername:admin

Trying 12.1.1.2 ...

Press CTRL+K to abort

Connected to 12.1.1.2...

The server is notauthenticated. Continue to access it? (y/n)[n]:y

Mar  6 2018 00:13:19-08:00 R1%%01SSH/4/CONTINUE_KEYEXCHANGE(l)[2]:The server ha

d not been authenticatedin the process of exchanging keys. When deciding whethe

r to continue, the userchose Y.

[R1]

Save the server's publickey? (y/n)[n]:y

The server's public keywill be saved with the name 12.1.1.2. Please wait...

 

Mar  6 2018 00:13:23-08:00 R1%%01SSH/4/SAVE_PUBLICKEY(l)[3]:When deciding wheth

er to save the server'spublic key 12.1.1.2, the user chose Y.

[R1]

Enterpassword:





你可能感兴趣的:(数通NA)