h3c交换机开启telnet登录------------------------------
开启Telnet服务:首先,需要在交换机上开启Telnet服务。可以通过以下命令实现:
[H3C]telnet server enable
配置用户权限:接下来,需要配置用户的权限。可以创建一个新的用户并设置其权限。例如,创建一个名为admin的用户,并设置其密码和服务类型为Telnet:
textCopy Code
[H3C]local-user admin class manage
[H3C-luser-manage-li]password simple admin
[H3C-luser-manage-li]authorization-attribute user-role level-15
[H3C-luser-manage-li]service-type telnet
设置认证模式:为了增强安全性,可以设置认证模式为scheme:
textCopy Code
[H3C]user-interface vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
通过以上步骤,您就可以成功开启H3C交换机的Telnet登录功能,并配置相应的用户权限和认证模式。
------------------H3C 交换机开启ssh--------------------------
[IT-test]public-key local create rsa #生成rsa key,v7系统版本可不做此步
[IT-test]public-key local create dsa #生成dsa key,v7系统版本可不做此步
[IT-test]local-user zhang #创建用户zhang
[IT-test-luser-zhang]password simple 123456 #配置用户密码,有些系统配置简单密码可能报错,先用 undo password-control complexity user-name check 不检查密码包含用户名信息,password-control length 4 密码长度最小4位
[IT-test-luser-zhang]service-type ssh telnet level 3 #分配服务类型ssh、telnet权限等级为3,v7系统版本用 authorization-attribute user-role level-15 给用户授权
[IT-test-luser-zhang]quit #退出
[IT-test]user-interface vty 0 4 #进入用户接口,允许远程登入的用户为0-4,只能有5个用户同时登入
[IT-test-ui-vty0-4]authentication-mode scheme #认证模式
[IT-test-ui-vty0-4]protocol inbound all #协议为所有
[IT-test-ui-vty0-4]idle-timeout 15 #15分钟后未操作自动登出用户
[IT-test-ui-vty0-4]quit #退出
[IT-test]ssh user zhang service-type stelnet #配置用户zhang服务类型ssh
[IT-test]ssh user zhang authentication-type password #配置用户zhang认证模式为密码
[IT-test]ssh server enable #全局开启ssh服务
<IT-test>free user-interface vty 2 #断开VTY 2的远程用户连接,用户不能使用该命令释放自己
H3C设备Console认证配置
[H3C]user-interface aux 0 #进入串口配置视图
[H3C-line-aux0]authentication-mode ? #选择认证模式分别是空密码/密码认证/用户名与密码认证
none Login without authentication #空密码
password Password authentication #密码认证
scheme Authentication use AAA #用户名与密码认证
[H3C-line-aux0]authentication-mode password
[H3C-line-aux0]set authentication password simple a123456
步骤3:验证设备重启后用console连接时需要输入密码
步骤4:删除Console认证密码的方法
[H3C]user-interface aux 0
[H3C-line-aux0]authentication-mode none #模式选择none 表示空密码
[H3C-line-aux0]quit
[H3C]quit
<H3C>save
步骤5:配置Console用户名和密码认证
[H3C]local-user liu
[H3C-luser-manage-liu]password simple a888888888
[H3C-luser-manage-liu]service-type terminal
[H3C-luser-manage-liu]authorization-attribute user-role network-admin
[H3C]user-interface aux 0
[H3C-line-aux0]authentication-mode scheme