华为设备开ssh和console账号密码配置命令

本文详细描述了如何配置console、VTY和SSH的登陆权限,包括使用AAA认证、生成密钥对、设置SSH服务器,以及AAA本地认证的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

console登陆用户名密码配置

aaa
local-user admin password cipher admin
local-user admin privilege level 15
local-user admin service-type terminal
提供console登陆的权限

user-interface con 0 //进入console也要aaa账号和密码
authentication-mode aaa

ssh配置:

配置STelnet登录。
在服务器端生成本地密钥对。
[DeviceA] rsa local-key-pair create
The key name will be:Host
The range of public key size is (2048, 3072).
NOTE: Key pair generation will take a short while.
Please input the modulus [default = 3072]:3072

#配置VTY用户界面0~4的认证方式为AAA认证、支持的协议为SSH。
[DeviceA] user-interface vty 0 4
[DeviceA-ui-vty0-4] authentication-mode aaa
[DeviceA-ui-vty0-4] protocol inbound ssh
[DeviceA-ui-vty0-4] quit

#开启设备的SSH服务器功能。
[DeviceA] stelnet server enable
[DeviceA] ssh server-source -i vlanif 10

配置所有SSH用户的认证方式为Password认证、服务方式为STelnet。
[DeviceA] ssh authentication-type default password

配置AAA本地认证。
[DeviceA] aaa
[DeviceA-aaa] local-user user1-huawei password irreversible-cipher
YsHsjx_202206
[DeviceA-aaa] local-user user1-huawei service-type ssh
[DeviceA-aaa] local-user user1-huawei privilege level 3
[DeviceA-aaa] quit

交换机客户端首次连接服务端
[S2]ssh client first-time enable
[S2]stelnet 192.168.2.2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

项目工程师余工

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值