华为交换机配置ssh登录远程管理交换机

配置华为交换机ssh远程登录,先配置交换机的管理地址和vlan,此处为vlan10 ,把接口GE0/0/1划入vlan10,管理地址为192.168.10.100/241、创建本地密钥对

配置接入交换机ssh

一、配置管理地址和接口vlan
[SW1]vlan 10
[SW1]interface vlan 10
[SW1-Vlanif10]ip address 192.168.10.100 24

[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 10

二、开启stelnet权限
[SW1]stelnet server enable

三、创建本地密钥对
[SW1]rsa local-key-pair create

四、创建ssh用户名为user
[SW1]ssh user user //创建用户
[SW1]ssh user user authentication-type password //创建用户认证为密码认证
[SW1]ssh user user service-type stelnet //服务类型为ssh

五、进入aaa模式下配置用户

[SW1]aaa //进入aaa模式
[SW1-aaa]local-user user password cipher user123 //配置用户密码为user123
[SW1-aaa]local-user user privilege level 15 //配置用户权限级别
[SW1-aaa]local-user user service-type ssh //允许用户ssh访问权限

六、配置vty界面支持的登录协议
[SW1]user-interface vty 0 4
[SW1-ui-vty0-4]authentication-mode aaa //认证为aaa
[SW1-ui-vty0-4]protocol inbound ssh //登录协议为ssh登入

七、登录ssh管理
通过xshell等工具登录
 

配置核心交换机ssh

1、创建本地密钥对

[Core-SW]rsa local-key-pair create
The key name will be: Core-SW_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
it will take a few minutes.
Input the bits in the modulus[default = 2048]:
Generating keys...
..+++++
........................++
....++++
...........++
2、检查是否存在SSH user(可跳过),系统提示没有SSH user 存在

[Core-SW]dis ssh user-information
Info: No SSH user exists.
3、创建SSH user

[Core-SW]ssh user test \可以直接敲第二行命令
[Core-SW]ssh user test authentication-type password \认证模式为密码认证
[Core-SW]ssh user test service-type stelnet \服务类型为stelnet,即SSH
4、创建用户

[Core-SW]aaa
[Core-SW-aaa]local-user test password cipher xxx(xxx处为你想要设置的密码)
Info: Add a new user.
[Core-SW-aaa]local-user test privilege level 3 \用户level最高到15
[Core-SW-aaa]local-user test service-type ?
8021x 802.1x user
bind Bind authentication user
ftp FTP user
http Http user
ppp PPP user
ssh SSH user
telnet Telnet user
terminal Terminal user
web Web authentication user
x25-pad X25-pad user
[Core-SW-aaa]local-user test service-type ssh \开启该用户允许使用SSH访问设备的权限
5、启用SSH(stelnet)服务

[Core-SW]stelnet server enable
Info: Succeeded in starting the Stelnet server.
6、配置vty界面支持的登录协议

[Core-SW]user-interface vty 0 4
[Core-SW-ui-vty0-4]authentication-mode aaa
[Core-SW-ui-vty0-4]protocol inbound ssh
————————————————
版权声明:本文为CSDN博主「鹿鸣天涯」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/jayjaydream/article/details/125569027

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

月梦工作室

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

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

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

打赏作者

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

抵扣说明:

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

余额充值