您的位置:首页 > 其它

华为基础试验

2018-03-06 00:18 253 查看


R1:gigabitEthernet0/0/0:12.1.1.1/24
R2:gigabitEthernet0/0/0:12.1.1.2/24
<Huawei>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配置:
<Huawei>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:
<R1>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
<R2>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:                        ——输入密码

<R1>

SSH登陆:
[R2]rsa local-key-paircreate                ——生成加密随机数The key name will be:Host% RSA keys defined forHost already exist.Confirm to replace them?(y/n)
:yThe range of public keysize is (512 ~ 2048).            ——随机数取值范围512-2048NOTES: If the keymodulus is greater than 512,       It will take a few minutes.Input the bits in themodulus[default = 512]:1024Generating 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.2Please input theusername:adminTrying 12.1.1.2 ...Press CTRL+K to abortConnected to 12.1.1.2...The server is notauthenticated. Continue to access it? (y/n)
:yMar  6 2018 00:13:19-08:00 R1%%01SSH/4/CONTINUE_KEYEXCHANGE(l)[2]:The server had not been authenticatedin the process of exchanging keys. When deciding whether to continue, the userchose Y. [R1]Save the server's publickey? (y/n)
:yThe 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 whether to save the server'spublic ke
8b88
y 12.1.1.2, the user chose Y. [R1]Enterpassword:<R2>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: