1.配置本地用户(默认权限 level 1)
[H3C]local-user admin [H3C-luser-admin]password cipher 123 [H3C]super password level 3 cipher 321 [H3C-luser-admin]service-type telnet ssh
1.1配置本地用户(直接设为 level 3)
[H3C]local-user admin [H3C-luser-admin]password cipher 123 [H3C-luser-admin]authorization-attribute level 3 [H3C-luser-admin]service-type telnet ssh
2.配置Telnet登录
[H3C]user-interface vty 0 4 [H3C-ui-vty0-4]authentication-mode scheme //调用AAA本地认证数据库验证 [H3C-ui-vty0-4]idle-timeout 20 0
2.1配置SSH登录(password认证)
# 生成RSA及DSA密钥对 [H3C]public-key local create rsa [H3C]public-key local create dsa # 开启SSH服务器功能 [H3C]ssh server enable # 配置允许SSH用户认证尝试的最大次数为5次。 [H3C]ssh server authentication-retries 5 # 配置SSH用户admin的服务类型为Stelnet,认证方式为password认证。 [H3C]ssh user admin service-type stelnet authentication-type password # 设置vty登录认证方式为本地AAA认证,登录协议仅SSH [H3C]user-interface vty 0 4 [H3C-ui-vty0-4]authentication-mode scheme [H3C-ui-vty0-4]protocol inbound ssh
时间: 2024-10-14 11:35:58