console口登录有三种认证方式:None、password、Scheme.

​1)设置登录用户的认证方式为None

#user-interface  aux  0

#authentication-mode  none

2)设置登录用户的认证方式为Password,并设置用户的认证口令为明文方式:

#user-interface  aux  0

#authentication-mode   password

#set  authentication  password  simple   123456

3)设置用户的认证方式为Scheme,采用本地认证方式

#local-user   guest      创建本地用户guest,并进入本地用户视图

#password   simple   123456           创建本地用户的认证口令为明文方式,口令为123456

#service-type   terminal  level   2     设置本地用户的服务类型为Terminal且用户级别为2

#quit  

#user-interface   aux  0   进入AUX用户界面视图

#authentication-mode   scheme     设置通过Console口登录交换机的用户进行Scheme认证


  指定system域为默认域,并设置该域Scheme认证方式local

#domain   default   enable   system   

#domain   system

#authentication    default   local


设置Telnet远程登录

​#system-view

#telnet   server  enable

#user-interface   vty  0


H3C配置   新机基础配置,console、telnet_访问控制列表

#user   privilege   level   3 

#protocol   inbound   telnet    设置VTY用户界面支持telnet协议

#screen-length   30     设置VTY  0  用户的终端屏幕的一屏显示30行命令

#history-command   max-size  20     设置VTY用户历史命令缓冲区可存放20条命令

#idle-timeout    6     设置VTY 0用户界面的超时时间为6分钟。


Telnet登录用户的认证方式有:None、Password和Scheme。


1)设置通过VTY  0  用户登录设备的Telnet用户不用进行认证

#user-interface   vty  0

#authentication-mode   none


2)设置通过VTY 0 口登录设备的Telnet用户进行Password认证,并设置认证口令明文方式,口令为20211120

#user-interface  vty  0

#authentication-mode    password

#set   authentication    password    simple   2011120


3)设置登录用户的认证方式为Scheme,采用本地认证的方式

#local-user   guest

#password  simple  123456

#service-type  telnet  level  3

#user-interface  vty  0

#authentication-mode   scheme  

#quit

#domain   default   enable   system

#domain  system  

#authentication  default   local



Web网管远程登录交换机配置:

​1)配置vlan 1 接口的IP地址:

#system-view

#interface   vlan-interface   1

#ip   address   10.153.17.82   255.255.255.0

#quit

2)配置web网管用户名为admin,认证口令为admin,用户级别为3级

#local-user   admin

#service-type   telnet  level  3

#password   simple   admin

#quit

3)开启交换机的Web  Server   功能

#ip  http  enable

通过http://10.153.17.82可访问


对远程登录用户的控制:

#acl  numle   2000  match-order  config

#rule   1  permit   source   10.1.1.2   0

#rule   2  permit    source   10.1.1.3   0

#rule   3  deny  source   any  

#quit

引用访问控制列表,通过IP对用户进行控制:

#user-interface   vty  0  4

#acl   2000   inbound

引用访问控制列表,通过源ip对网管用户进行控制

#snmp-agent   community   read   aaa   acl   2000

#snmp-agent    group   v2c   groupa   acl   2000

#snmp-agent    usm-user   v2c   groupa   acl   2000

引用访问控制列表,通过源ip对web用户进行控制;

#ip   http   acl  2000


配置设备为ftp服务器:

#system-view

#local-user   wang

#password   simple   ftp

 指定wang可以使用的服务类型为ftp,并设置其授权访问目录

#service-type   ftp 

#work-directory  flash:/

 设置wang的用户级别为3级,使其可以向访问目录中上传文件。

#level   3 

#quit

#ftp  server  enable

#quit


<sysname>boot-loader  file   aaa.bin  main  设置下载的文件aaa.bin为设备下次启动时的主用启动文件

<sysname>backup  startup-configuration   to  192.168.0.4   将配置文件备份到tftp服务器(192.168.0.4)上。

<sysname>startup   saved-configuration   config.cfg   main     指定config.cfg作为下次启动时使用的配置文件

<sysname> restore   startup-configuration   from   192.168.1.2  config.cfg    若当前启动的配置文件config.cfg出现问题,则从tftp服务器上将备份的配置文件进行恢复。