300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 华为交换机配置ssh登录远程管理交换机

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

时间:2024-03-10 04:38:57

相关推荐

华为交换机配置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版权协议,转载请附上原文出处链接及本声明。

原文链接:/jayjaydream/article/details/125569027

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。