曲径通幽论坛

 找回密码
 立即注册
搜索
查看: 3333|回复: 0
打印 上一主题 下一主题

[华为] [交换机]给交换机加入控制口密码

[复制链接]

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34395
跳转到指定楼层
楼主
发表于 2015-11-21 16:49:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
为了防止一拿个笔记本接入控制口就能配置交换机,可以考虑设置一个密码。

1. 进入 console0
<Huawei>system-view
[Huawei]user-interface con 0

2. 使用 authentication-mode 命令添加密码:
[Huawei-ui-console0]authentication-mode ?
  aaa       AAA authentication
  none      Login without checking
  password  Authentication through the password of a user terminal interface

none 是默认行为,不需要密码即可登录。
password 要求在进入 console 时需要输入一个密码。运行以下命令:
authentication-mode password

这一步命令,仅是告诉交换机登录时需要输入密码,但下一步还需要进一步设定一个密码。

3. 设定密码:
[Huawei-ui-console0]set authentication password ?
  cipher  Set the password with cipher text
  simple  Set the password in plain text

simple 是以明文保存密码;cipher 是以密文保存密码。

比如要以明文保存密码,那么只要:
  1. [Huawei-ui-console0]set authentication password simple 1234567
复制代码

明文保存的密码在执行 display current-configuration 命令时,可以看得到。

在 authentication-mode 中,还有一项 aaa ,表示需要同时需要输入用户名和密码才能登录。在执行了 authentication-mode aaa 命令后,要先 quit 退出,然后在系统视图模式下,建立用户:
[Huawei]aaa
[Huawei-aaa]local-user groad password cipher 123456
Info: Add a new user.

上面增加了一个名为 groad 的用户,密码为 123456,以加密方式存放。这样做之后,一直 quit 退出,那么再登录时,就会看到需要输入用户名和密码的提示:
Please Press ENTER.


Login authentication


Username:

注意,如果是 EPSN 虚拟机才做,光是如上配置,那么在关闭交换机并重启或下次打开软件时,之前所做的配置会消失。保存方法有二:
1. 在用户视图模式下,直接敲入 save 命令保存,然后再在 ensp 上单击工具栏上的 “保存” 按钮,将拓扑保存下来。

2. 在设备图标上右键菜单中,导出配置。



您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2025-5-4 21:32 , Processed in 0.071692 second(s), 26 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表