| H3C防火墙配置SSH连接 基本配置 system-view sysname fw1 undoinfo-center enable interfacegigabitethernet 0/3  //进入接口 description trust  //配置接口描述 ip address10.1.1.1 24  //配置IP manage pinginbound  //接口放行ping入站 manage pingoutbound  //接口放行ping出站 manage ssh inbound  //接口放行ssh入站 quit 注意,ssh客户端所在trust域的接口需要放行ssh入站。 interfaceloopback 0  //配置环回接口 descriptionmanagerment  //描述为管理口 ip address10.10.10.1 32 quit 注意,配置环回口做为管理地址也是ssh地址。   配置安全策略 security-zonename trust  //配置安全域 importinterface gigabitethernet 0/3  //加入接口 quit security-policyip  //建立安全策略 rule name ssh  //规则命名 source-zonetrust  //源域为trust destination-zonelocal  //目标域为local source-ip-host10.1.1.100  //源主机地址 destination-ip-host10.10.10.10  //目标主机地址 service any  //放行全部服务 action pass  //动作执行放行 quit quit 注意,ssh的区域流量是ssh用户端所在的trust区域访问防火墙本身/local区域。   配置用户线视图及用户 user-interfacevty 0 63  //进入虚拟用户视图 authentication-modescheme  //身份认证模式为scheme protocolinbound all  //放行全部协议入站 user-rolenetwork-admin  //用户角色为网络管理员 idle-timeout30  //配置无动作登出时间为30M quit local-userzurkj  //创建本地用户zurkj passwordsimple 123456  //配置用户密码 authorization-attributeuser-role level-15  //用户角色的授权属性为最高级别 service-typessh http https  //配置服务类型 quit public-keylocal create rsa  //创建本地rsa密钥对 public-keylocal create dsa  //创建本地dsa密钥对 ssh serverenable  //开启ssh服务 sftp serverenable  //开启sftp服务 ssh userzurkj service-type all authentication-type password 验证               复制代码system-view
sysname fw1
undo info-center enable
interface gigabitethernet 1/0/3
description trust
ip address 10.1.1.1 24
manage ping inbound
manage ping outbound
manage ssh inbound
quit
interface loopback 0
description managerment
ip address 10.10.10.1 32
quit
security-zone name trust
import interface gigabitethernet 1/0/3
quit
security-policy ip
rule name ssh
source-zone trust
destination-zone local
source-ip-host 10.1.1.100
destination-ip-host 10.10.10.10
service any
action pass
quit
quit
user-interface vty 0 63
authentication-mode scheme
protocol inbound all
user-role network-admin
idle-timeout 30
quit
local-user zurkj
password simple Aa123456!!
authorization-attribute user-role level-15
service-type ssh http https
quit
public-key local create rsa
y
public-key local create dsa
y
ssh server enable
sftp server enable
ssh user zurkj service-type all authentication-type password
 |