最佳答案
虚墙拥有和根墙相同的属性,因此SSH是支持的。
<H3C>system-view
# 生成RSA密钥对,在提示“Y/N”的时候选择“Y”。
[H3C]public-key local create rsa
The local key pair already exists.
Confirm to replace it? [Y/N]:y
The range of public key modulus 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密钥对
[H3C]public-key local create dsa
The range of public key modulus 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服务器功能
[H3C]ssh server enable
# 配置接口GigabitEthernet1/0/4的IP地址,客户端将通过该地址连接SSH服务器。
[H3C]interface GigabitEthernet1/0/4
[H3C-GigabitEthernet1/0/4]ip address 192.168.10.1 255.255.255.0
[H3C-GigabitEthernet1/0/4]quit
# 设置SSH客户端登录用户线的认证方式为AAA认证。
[H3C]line vty 0 63
[H3C-line-vty0-63]authentication-mode scheme
[H3C-line-vty0-63]quit
# 创建设备管理类本地用户为admin,密码为admin;并设置服务类型为SSH,用户角色为network-admin。
[H3C]local-user admin
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]password simple admin
[H3C-luser-manage-admin]quit
# 把接口GigabitEthernet1/0/1加入trust区域
[H3C]security-zone name Trust
[H3C-security-zone-Trust]import interface GigabitEthernet1/0/1
[H3C-security-zone-Trust]quit
#创建对象策略pass。
[H3C]object-policy ip pass
[H3C-object-policy-ip-pass] rule 0 pass
[H3C-object-policy-ip-pass]quit
#创建Trust到Local域的域间策略调用pass策略。
[H3C]zone-pair security source Trust destination Local
[H3C-zone-pair-security-Trust-Local]object-policy apply ip pass
[H3C-zone-pair-security-Trust-Local]quit
#创建Local到Trust域的域间策略调用pass策略。
[H3C]zone-pair security source Local destination Trust
[H3C-zone-pair-security-Local-Trust]object-policy apply ip pass
[H3C-zone-pair-security-Local-Trust]quit
#只允许内网192.168.10.0/24网段用户登录设备
#配置ACL:
[H3C]acl basic 2999
[H3C-acl-ipv4-basic-2999]rule permit source 192.168.10.0 0.0.0.255
[H3C-acl-ipv4-basic-2999]quit
#在SSH服务中调用
[H3C]SSH server acl 2999
#测试无问题后,再保存配置
[H3C]save force
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论