netconf over ssh联用

本文详细介绍了如何在H3CS12508设备上配置SSH服务器,包括开启SSH服务、高级访问控制(ACL)、全局端口调用、创建并授权SSH用户、启用NetConf服务以及配置用户登录。最终验证了配置的正确性。

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

H3c s12508 为示例:

打开ssh协议(系统视图以下用“#”代替不再赘述)

#
ssh server enable

 高级访问控制:

#
acl number 3815 name xxoo
  rule 0 permit tcp source x.x.x.x  x.x.x.x  destination x.x.x.x  x.x.x.x destination-port eq 22
  rule 5 permit tcp source x.x.x.x  x.x.x.x  destination x.x.x.x  x.x.x.x destination-port eq 830

 或

  rule 0 permit tcp source x.x.x.x  x.x.x.x  destination x.x.x.x  x.x.x.x destination-port range 22 830

全局端口调用acl 3815规则(也可选择精确端口或vlan):

#
packet-filter 3815 global inbound

ssh服务使能acl 3815:

#
ssh server acl 3815

vty视图配置:

#
user-interface vty 0 4
 authentication-mode scheme
 user-role network-admin
 user-role network-operator
 protocol inbound ssh

创建ssh用户及授权:

#
local-user  xxxx  class manage
 password   88888888
 service-type telnet ssh terminal
 authorization-attribute user-role level-15
 authorization-attribute user-role network-operator

打开netconf服务及监听端口:

#
netconf ssh server enable
netconf ssh server port 830

启用用户xxxx以netconf over ssh 登录的连接方式:

#
ssh user xxxx service-type netconf authentication-type password

结果输出:

##

验证成功。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值