H3C-配置Line接入方式_HCL

Console

# AAA - 用户接入方式
line con 0
 authentication-mode scheme
#
local-user NEWH3C class manage
 password simple H3C@MMS12ge**hao
 service-type terminal
# Password - 密码接入方式
user-interface console 0 # 某些系统版本不支持此方式
 authentication-mode password
 user-role network-admin
 set authentication password simple H3C@MMS12ge**hao

Telnet

# AAA - 用户接入方式
telnet server enable
#
line vty 0 4
 authentication-mode scheme
 user-role network-operator
 protocol inbound telnet
#
local-user H3C class manage
 password simple HCL@MMS3307
 service-type telnet

# Passwo - 密码接入方式
telnet server enable
#
line vty 0 4
 user-role network-operator
 set authentication password simple HCL@MMS3307
 protocol inbound telnet

SSH

# (密码+密钥)创建密钥,密钥类型选择:RSA、DSA、ECDSA
public-key local create [rsa、dsa、ecdsa]
The range of public key modulus is (512 ~ 2048). 
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:2048
Generating Keys...
.
Created the key pair successfully.
#
line vty 0 4
 authentication-mode scheme
 protocol inbound ssh
#
local-user NEW-H3C class manage
 password hash H3C@MMS12ge**hao
 service-type ssh
[可选 - SSH用户类型、认证方式]ssh user NEW-H3C service-type  stelnet authentication-type password

# Password - 密码(普通认证)
ssh server enable
#
line vty 0 4
 authentication-mode scheme
 user-role network-operator
 protocol inbound ssh
#
local-user USER class manage
 password simple USER123@H3C
 service-type ssh
  • 测试
<H3C>ssh 192.168.10.1
Username: USER
Press CTRL+C to abort.
Connecting to 192.168.10.1 port 22.
The server is not authenticated. Continue? [Y/N]:Y
Do you want to save the server public key? [Y/N]:Y
USER@192.168.10.1's password: 
Enter a character ~ and a dot to abort.
******************************************************************************
* Copyright (c) 2004-2022 New H3C Technologies Co., Ltd. All rights reserved.*
* Without the owner's prior written consent,                                 *
* no decompiling or reverse-engineering shall be allowed.                    *
******************************************************************************

<R1>dis users
  Idx  Line         Idle       Time              Pid     Type
  0    CON 0        00:01:26   Nov 14 08:51:25   244          
+ 66   VTY 0        00:00:00   Nov 14 09:05:06   334     SSH  

Following are more details.
CON 0   :
        User role list: network-admin 
VTY 0   :
        User name: USER
        User role list: network-admin network-operator 
        Location: 192.168.10.100
 +    : Current operation user.
 F    : Current operation user works in async mode.
<R1>