最佳答案
1、先配置SSH
https://www.h3c.com/cn/d_201907/1212875_30005_0.htm
2、配置SSH的限制访问
在VTY调用本地用户登录
[H3C]line vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]quit
创建ACL,仅允许管理员IP 1.1.1.1、1.1.1.2通过SSH登录交换机,其他IP无法登陆
[H3C]acl basic 2000
[H3C-acl-ipv4-basic-2000]rule 0 permit source 1.1.1.1 0
[H3C-acl-ipv4-basic-2000]rule 1 permit source 1.1.1.2 0
[H3C-acl-ipv4-basic-2000]quit
[H3C]ssh server acl 2000
(0)
【命令】
ssh-server source-interface interface-type interface-number
undo ssh-server source-interface
【视图】
系统视图
【参数】
interface-type:源接口的类型,取值可以为LoopBack或Vlan-interface。
interface-number:源接口的编号。
【描述】
ssh-server source-interface命令用来为SSH Server指定源接口。当指定接口不存在时,命令提示不成功。undo ssh-server source-interface命令用来取消指定的源接口,取消后,以系统决定的本设备接口供SSH用户访问。
【举例】
# 为SSH Server指定源接口Vlan-interface 1。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ssh-server source-interface Vlan-interface 1
【命令】
ssh-server source-ip ip-address
undo ssh-server source-ip
【视图】
系统视图
【参数】
ip-address:需要设置的源IP地址。
【描述】
ssh-server source-ip命令用来为SSH Server指定源IP地址。当指定的ip-address不是本设备地址时,命令提示不成功。undo ssh-server source-ip命令用来取消指定的源IP地址,取消后,以系统决定的本设备地址供SSH用户访问。
【举例】
# 为SSH Server指定源IP地址192.168.0.1。
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ssh-server source-ip 192.168.0.1
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论