• 华为登录认证配置学习笔记


    以华为S5700-28C-HI交换机为例,配置登录认证学习笔记一:

    一)、无需任何密码通过控制端口登录

    [switchA]user-interface con 0  
    [switchA-ui-console0]authentication-mode none
    [switchA-ui-console0]disp this
    #
    user-interface con 0
     set authentication password simple 123456
    

    此时,尽管交换机设置了console登录密码为123456,但由于console口已被设置为不进行安全的认证的方式,故通过console端口登录交换机时并不需要输入密码。这也是华为S5700出厂时的默认方式。

    (二)、使用密码通过控制端口登录

    如果我们此时输入以下命令,把console口登录认证方式设置为密码认证方式的话,那么在通过console端口登录交换机时就需要输入密码,也就是我们设置的密码123456。

    [switchA-ui-console0]authentication-mode password 
    [switchA-ui-console0]disp this
    #
    user-interface con 0
     authentication-mode password
     set authentication password simple 123456
    

    此时,console口的登录均与交换机中的用户无关,即与aaa中的local-user毫无关系。

    (三)、使用aaa用户名和密码从控制端口登录

    如果我们想配置以aaa中的用户从console端口登录,则需要:

    1、设置con的认证模式为aaa

    user-interface con 0
     authentication-mode aaa
     set authentication password simple 123456
    

    2、创建aaa用户,并保证该用户拥有terminal的服务类型权限(默认情况下,所有的aaa用户都拥有terminal权限的,除非特别排除,因此如果单纯的只是为了让下面的admin用户拥有可以console的权限,service-type的权限是不用特别设置的)。

    aaa
     local-user admin password simple abc@123
     local-user admin service-type telnet terminal ssh 

    此时从console口登录时需输入用户名:admin 和认证密码:abc@123。因为我们把console的认证模式设置为使用aaa用户的认证方式,故认证过程中的一切要素均来自于aaa用户中的各个属性值,故其认证密码也就与“set authentication password simple 123456中的密码无关了。

    当然,在实际生产过程中我们在设置密码时一般都不会设置存储明文密码字符串,而是会选择对密码串进行加密:"set authentication password cipher 123456”,这样的话当我们在display 时看到的就是加密之后的密码串了。

    (四)、配置设备可以telnet登录

    1、配置管理Ip

    interface vlanif 1
      ip address 172.16.1.254 255.255.255.0
    

    2、开启telnet服务

    telnet server enable

    3、设置vty 0 4认证方式

       a、方式一:设置telnet为password认证方式,即telnet时无登录用户名,只需输入telnet密码123456就可以了

    user-interface vty 0 4
     authentication-mode password
     user privilege level 15      /*设置远程登录后的操作权限级别为最高的15级*/
     set authentication password simple 123456
     protocol inbound all         /*华为默认远程只允许ssh登录,把它改为protocol inbound ssh telnet 或 all就行了。*/
    

       b、方式二:设置telnet为aaa用户认证方式,即telnet时需输入登录用户名和登录密码,即admin和abc@123,下面的倒数第2、3行的内容与aaa用户认证无关。

    #
    aaa
     local-user admin password simple abc@123
     local-user admin service-type telnet terminal ssh  /*设置admin用户拥有telnet、terminal和ssh的权限*/
     local-user admin privilege level 15 /*如果此处不设置,默认level=3,其实也是系统管理权限*/
    quit
    #
    user-interface vty 0 4
     authentication-mode aaa
     user privilege level 15      /*设置远程登录后的操作权限级别为最高的15级,此权限对以aaa身份登录的用户无效*/
     set authentication password simple 123456
     protocol inbound all         /*华为默认远程只允许ssh登录,把它改为protocol inbound ssh telnet 或 all就行了。*/
    

  • 相关阅读:
    【机器学习基础】02、matplotlib基本01
    HIVE学习笔记
    实时数仓项目-01实时模块搭建
    net_framework-EF CodeFirst
    一些前端知识的小记
    .netcore-FreeSql的使用-搭建context
    netcore配置文件与发布
    .netcore与vue的学习笔记001
    .net项目的mvc简单发布
    .net中的SelectList在Html.DropdownList中的使用
  • 原文地址:https://www.cnblogs.com/xieyunc/p/9126454.html
Copyright © 2020-2023  润新知