h3c s5500 ssh v5 配置_H3C S5130系列交换机ssh典型配置举例(passwd认证)

本文提供了一个配置H3C S5130系列交换机为SSH服务器的实例,包括生成RSA和DSA密钥对、启用SSH服务、配置VLAN接口、设置用户认证方式、创建本地用户并设定权限,以实现安全的远程管理。
摘要由CSDN通过智能技术生成

摘自H3C官网:http://www.h3c.com/cn/d_201803/1072475_30005_0.htm

设备作为Stelnet服务器配置举例(password认证)

如图1所示,网络管理员需要通过Internet远程登录到校园网的网关设备(Device)上对其进行相关配置。为了提高对Device进行管理的安全性,可将Device配置为Stelnet服务器,并在Host上运行Stelnet客户端软件,在二者之间建立SSH连接。要求:

·Device通过SSH的password认证方式对客户端进行认证,认证过程在Device本地完成;

·网络管理员Host的登录用户名为client001,密码为aabbcc,登录设备后可以正常使用所有命令。

·为了使SSH的版本协商和算法协商过程正常运行,且为了保证客户端对连接的服务器的认证正常进行,请在服务器端生成RSA和DSA密钥对。

·为了采用本地认证的方式认证用户,需要在本地服务器Device上创建相应的本地用户,并在本地用户视图下配置密码。

·Stelnet客户端通过VTY用户线访问设备。因此,需要配置登录用户线的认证方式为scheme方式。

·为了使Stelnet用户登录设备后能正常使用所有命令,将用户角色设置为network-admin,缺省情况下本地用户的用户角色为network-operator。

# 生成RSA密钥对。

system-view

[Device] public-key local create rsa

The range of public key size is (512~ 2048).

If the key modulus is greater than 512, it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:

Generating Keys...

........................++++++

...................++++++

..++++++++

............++++++++

Create the key pair successfully.

# 生成DSA密钥对。

[Device] public-key local create dsa

The range of public key size is (512~ 2048).

If the key modulus is greater than 512, it will take a few minutes.

Press CTRL+C to abort.

Input the modulus length [default = 1024]:

Generating Keys...

.++++++++++++++++++++++++++++++++++++++++++++++++++*

........+......+.....+......................................+

...+.................+..........+...+.

Create the key pair successfully.

# 使能SSH服务器功能。

[Device] ssh server enable

#创建VLAN 2,并将GigabitEthernet1/0/2加入VLAN 2。

[Device] vlan 2

[Device-vlan2] port gigabitethernet 1/0/2

[Device-vlan2] quit

# 配置VLAN接口2的IP地址,客户端将通过该地址连接Stelnet服务器。

[Device] interface vlan-interface 2

[Device-Vlan-interface2] ip address 192.168.1.40 255.255.255.0

[Device-Vlan-interface2] quit

# 设置Stelnet客户端登录用户界面的认证方式为scheme。

[Device] line vty 0 63

[Device-line-vty0-63] authentication-mode scheme

[Device-line-vty0-63] quit

# 创建本地用户client001,并设置用户密码、服务类型和用户角色。

[Device] local-user client001 class manage

New local user added.

[Device-luser-manage-client001] password simple aabbcc

[Device-luser-manage-client001] service-type ssh

[Device-luser-manage-client001]authorization-attribute user-role network-admin

[Device-luser-manage-client001] quit

#

vlan 2

#

interface Vlan-interface2

ip address 192.168.1.40 255.255.255.0

#

interface GigabitEthernet1/0/2

port access vlan 2

#

line vty 0 63

authentication-mode scheme

#

ssh server enable

#

local-user client001 class manage

password hash

$h$6$CqMnWdX6LIW/hz2Z$4+0Pumk+A98VlGVgqN3n/mEi7hJka9fEZpRZIpSNi9b

cBEXhpvIqaYTvIVBf7ZUNGnovFsqW7nYxjoToRDvYBg==

service-type ssh

authorization-attribute user-role network-admin

authorization-attribute user-role network-operator

#

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值