一、H3C命令
1、设置“system-view”命令为0 级,执行视图为用户视图(Shell)
[Sysname] command-privilege level 0 view shell system-view
2、查看历史命令:display history-command 默认是10条
(1) 设置历史命令的缓冲区的大小:history-command max-size
3、super:命令是使用用户从当前级别切换到level级别,如果没有指定具体的级别,则默认表示从当前级别切换到级别 3
(1) super authentication-mode、super password相关配置密码的命令 (2) super authentication-mode { super-password | scheme }*
? super-password:用户级别切换采用super 密码认证方式。 ? scheme:用户级别切换采用HWTACAS 认证方式
二、登录以太网交换机命令
1、authentication-mode
(1)命令:
authentication-mode { none | password | scheme [ command-authorization ] } (2)参数:
none:不认证。
password:进行本地口令认证。
scheme:进行本地或远端用户名和口令认证。
command-authorization:在TACACS 认证服务器上进行命令行授权。 (3)举例
? 配置Console 口的认证方式为本地口令认证,且认证口令为明文cdw。
System View: return to User View with Ctrl+Z. [Sysname] user-interface aux 0
[Sysname-ui-aux0] authentication-mode password
[Sysname-ui-aux0] set authentication password simple cdw
? 配置通过Telnet 登录的VTY 用户认证方式为scheme 认证
System View: return to User View with Ctrl+Z. [Sysname] user-interface vty 0
[Sysname-ui-vty0] authentication-mode scheme [Sysname-ui-vty0] quit
指定system 域为缺省域,并设置该域Scheme 认证方式local。
[Sysname] domain default enable system [Sysname] domain system
[Sysname-isp-system] scheme local
设置本地认证的用户名和密码。
[Sysname] local-user guest
[Sysname-luser-guest] password simple 123456 [Sysname-luser-guest] service-type telnet level 2
2、auto-execute command:
(1)auto-execute command 命令用来设置自动执行命令,当某条命令被设置后,在用
户登录时将自动执行该命令
(2)undo auto-execute command 命令用来取消自动执行命令。
(3)通常的用法是在终端用 auto-execute command 配置telnet 命令,使用户自动连
接到指定的设备 (4)设置用户从VTY0 登录后,自动执行telnet 10.110.100.1 命令
[Sysname] user-interface vty 0
[Sysname-ui-vty0] auto-execute command telnet 10.110.100.1
% This action will lead to configuration failure through ui-vty0. Are you sure?[ Y/N]y 完成命令配置后,当用户通过VTY0 用户界面登录设备时,设备将自动执行
所设置的命令,并注销当前用户
3、copyright-info enable
(1)copyright-info enable 命令用来设置用户登录时终端显示版权声明提示信息(缺省) (2)undo copyright-info enable 命令用来设置用户登录时终端不显示版权声明提示信息
4、display telnet-server source-ip
(1)命令用来显示当前为Telnet Server 设置的源IP地址
(2)显示当前为Telnet Server 设置的源IP 地址
The source IP you specified is 192.168.1.1
5、display telnet source-ip
(1)命令用来显示当前为Telnet Client 设置的源IP 地址 (2)显示当前为Telnet Client 设置的源IP 地址
The source IP you specified is 192.168.1.1
6、display users
(1)命令用来显示用户界面的用户信息。
(2)all:参数all是显示所有用户界面的用户信息。
7、free user-interface
(1)命令用来释放指定的用户界面,命令执行后对应的用户连接将被断开。 (2)通过用户界面0 登录交换机,释放用户界面VTY1
Are you sure you want to free user-interface vty1 [Y/N]? y
8、header
(1)描述:header 命令用来设置用户登录以太网交换机时,以太网交换机向用户提示的相关信息。undo header 命令用来取消相关信息的设置 (2)参数:
? ? ? ?
incoming:配置Modem 登录用户进入用户视图时的显示信息。 legal:配置登录用户进入用户视图前的授权信 login:配置登录验证时的显示信息
shell:配置非Modem 登录用户进入用户视图时的显示信息
9、history-command max-size
(1)history-command max-size 命令用来设置当前用户视图历史命令缓冲区的大小 (2)undo history-command max-size 命令用来恢复缺省情况
(3)缺省情况下,历史命令缓冲区的大小为 10,即可存放10 条历史命令 (4)配置:
[Sysname] user-interface aux 0
[Sysname-ui-aux0] history-command max-size 20
10、idle-timeout
(1)idle-timeout 命令用来配置用户超时断开连接的时间,如果在所设定的时间内登录
到当前用户界面上的用户没有对交换机执行任何操作,则交换机将断开与该用户的 连接。undo idle-timeout 命令用来恢复超时断开连接的缺省值。 (2)参数
? ?
minutes:分钟数,取值范围为0~35791 seconds:秒数,取值范围为0~59
(3)配置
[Sysname] user-interface aux 0
[Sysname-ui-aux0] idle-timeout 1
11、ip http shutdown
(1)ip http shutdown 命令用来关闭WEB Server。undo ip http shutdown 命令用来
启动WEB Server
12、lock
(1)lock 命令用来锁住当前用户界面,防止未授权的用户操作该界面
13、protocol inbound
(1)protocol inbound 命令用来配置用户界面支持的协议。 (2)缺省情况下,系统对 Telnet 和SSH 协议均支持 (3)参数 ? ? ?
all:支持所有的协议,包括Telnet 和SSH。 ssh:支持SSH 协议 telnet:支持Telnet 协议
(4)举例
[Sysname] user-interface vty 0
[Sysname-ui-vty0] protocol inbound ssh
14、screen-length
(1)screen-length 命令用来配置终端屏幕上一屏中能够显示的终端信息的行数。
(2)undo screen-length 命令用来恢复终端屏幕上一屏中能够显示的终端信息的行数为 缺省值
(3)缺省情况下,每屏显示 24 行。取值为 0 表示关闭分屏显示功能
相关推荐: