-给设备设置用户名加密码登录

目录

设置用户名和密码

aaa认证模式  ,

清除用户名和密码登录

实现远程登陆


设置用户名和密码

aaa认证模式  ,

[Huawei] system-view           //从用户视图进入系统视图
[Huawei] sysname haha      //更改系统用户名称

[haha] user-interface console 0            //进入线路模式
[haha-ui-console0] authentication-mode ?          //?查看身份验证模式有哪些
  aaa       AAA authentication
  password  Authentication through the password of a user terminal interface

[haha-ui-console0] authentication-mode aaa     //设定认证模式为aaa

[haha-ui-console0]quit
[haha]aaa
[haha-aaa] local-user huawei password ?
  cipher  User password with cipher text      //cipher以密文方式输入的用户密码

[haha-aaa]local-user huawei password cipher huawei       //设置用户名和密码  cipher为一种加密方式
Info: Add a new user.        //这里提示 我们添加新用户信息成功   接下来 我们需要赋予用户相应的权限
[haha-aaa] local-user huawei privilege level  ?
  INTEGER<0-15>  Level value        //权限级别 有1-15级  我们给用户最高的权限
[haha-aaa] local-user huawei privilege level  15

               //接下来我们指定aaa的服务类型  ,因为我们需要他作为本地登陆,所以选择telnet

[haha-aaa] local-user huawei service-type telnet 

 //service-type设置服务类型   telnet本地登录
 

8021x    802.1x user
  bind     Bind authentication user
  ftp      FTP user
  http     Http user
  ppp      PPP user
  ssh      SSH user
  sslvpn   Sslvpn user
  telnet   Telnet  user
  web      Web authentication user
  x25-pad  X25-pad user
  <cr>     Please press ENTER to execute command 

接下来 quit 退出之后 再登陆的话  则需要我们方才设置的用户和密码了

Login authentication


Username:huawei
Password:              //由于加密原因 此处不显示
<haha>

清除用户名和密码登录

[haha] user-interface console 0
[haha-ui-console0] undo authentication-mode
[haha-ui-console0] quit
[haha] quit
<haha>

实现远程登陆

[r3]user-interface vty 0 4
[r3-ui-vty0-4]au

[r3-ui-vty0-4]authentication-mode ? 
  aaa       AAA authentication
  password  Authentication through the password of a user terminal interface
[r3-ui-vty0-4]authentication-mode aaa
[r3-ui-vty0-4]q

[r3-aaa]local-user huawei password cipher huawei
Info: Add a new user.

[r3-aaa]local-user huawei privilege level 15
[r3-aaa]

[r3-aaa]local-user huawei ?
  access-limit   Set access limit of user(s)
  ftp-directory  Set user(s) FTP directory permitted
  idle-timeout   Set the timeout period for terminal user(s)
  password       Set password 
  privilege      Set admin user(s) level
  service-type   Service types for authorized user(s)
  state          Activate/Block the user(s)
  user-group     User group

[r3-aaa]local-user huawei service-type telnet 
[r3-aaa]q
[r3]

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值