华为交换机、H3C交换机配置SSH登录:

安全壳(SSH)是一种网络安全协议,用于加密网络数据,以便在不安全的环境中提供安全的远程登录和其他网络服务。

SSH数据加密传输,认证机制更加安全,而且可以替代telnet,现在已经被广泛使用了

1、 HUAWEI交换机配置SSH登陆

[Huawei]rsa local-key-pair create #生成本地密钥对

The key name will be: Auotnavi-callcenter-01_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 = 512]:1024 #设置密钥位数

Generating keys…

[Huawei]aaa

[Huawei -aaa]local-user huawei password cipher huawei #新建用户名密码

[Huawei -aaa]local-user huawei privilege level3 #用户权限等级

[Huawei]ssh user huawei authentication-typepassword #认证类型

[Huawei]local-user huawei service-type stelnet #stelnet即SSH

[Huawei]stelnet server enable #开启SSH服务

[Huawei]user-interface vty 4

[Huawei -ui-vty4]authentication-mode aaa #用户认证方式为AAA

[Huawei -ui-vty4]protocol inbound ssh #设置VTY只支持SSH协议

2、 H3C交换机配置SSH登陆

[H3C]rsa local-key-pair create #生成本地密钥对

The key name will be: Auotnavi-callcenter-01_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 = 512]:1024 #设置密钥位数

Generating keys.

local-user h3c password cipher h3c123

service-type ssh level 3

ssh user h3c authentication-type password #使用SSH+密码认证

user-interface vty 0 4

[H3C-ui-vty0-4]authentication-mode scheme

[H3C-ui-vty0-4]protocol inbound ssh

[H3C-ui-vty0-4]user privilege level 3

相关推荐