<H3C>dis cu
#
version 7.1.042, Release 0007P02
#
sysname H3C
#
telnet server enable
#
dhcp enable
dhcp server always-broadcast
#
system-working-mode
password-recovery enable
#
vlan 1
#
dhcp server ip-pool vlan1
network 192.168.2.0 mask 255.255.255.0
forbidden-ip 192.168.2.1
forbidden-ip 192.168.2.254
gateway-list 192.168.2.1
#
dhcp server ip-pool www
network 192.168.1.0 mask 255.255.255.0
address range 192.168.1.2 192.168.1.254
dns-list 192.168.0.1
expired day 30
gateway-list 192.168.1.1
#
dhcp server ip-pool www4
network 192.168.4.0 mask 255.255.255.0
address range 192.168.4.2 192.168.4.254
expired day 10
gateway-list 192.168.4.1
#
controller Cellular0/0
#
controller Cellular0/1
#
interface Aux0
#
interface NULL0
#
interface Vlan-interface1
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 192.168.0.254 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/1
port link-mode route
ip address 192.168.1.1 255.255.255.0
dhcp server apply ip-pool www
#
interface GigabitEthernet0/2
port link-mode route
ip address 192.168.4.1 255.255.255.0
dhcp server apply ip-pool www4
#
scheduler logfile size 16
#
line class aux
user-role network-admin
#
line class tty
user-role network-operator
#
line class vty
user-role network-operator
#
line aux 0
user-role network-admin
#
line vty 0 63
authentication-mode scheme
user-role network-operator
#
ip route-static 0.0.0.0 0 192.168.0.1
#
ssh server enable
#
acl number 2000
rule 1000 permit source 192.168.3.0 0.0.0.255
rule 1001 permit source 192.168.4.0 0.0.0.255
rule 1002 permit source 192.168.1.0 0.0.0.255
#
domain system
#
aaa session-limit ftp 16
aaa session-limit telnet 16
aaa session-limit http 16
aaa session-limit ssh 16
aaa session-limit https 16
domain default enable system
#
role name level-0
description Predefined level-0 role
#
role name level-1
description Predefined level-1 role
#
role name level-2
description Predefined level-2 role
#
role name level-3
description Predefined level-3 role
#
role name level-4
description Predefined level-4 role
#
role name level-5
description Predefined level-5 role
#
role name level-6
description Predefined level-6 role
#
role name level-7
description Predefined level-7 role
#
role name level-8
description Predefined level-8 role
#
role name level-9
description Predefined level-9 role
#
role name level-10
description Predefined level-10 role
#
role name level-11
description Predefined level-11 role
#
role name level-12
description Predefined level-12 role
#
role name level-13
description Predefined level-13 role
#
role name level-14
description Predefined level-14 role
#
user-group system
#
local-user admin class manage
password hash $h$6$TBC/kwP6u5AUmzHz$Lw8GqQiBy7Ws9s9qfNJhB5WjmVuT/4xeMfix8vWsGLq HjT8Xb/MW4UZrfAkiFps5VLW1umewwMgdv2mv06jYYw==
service-type http https
authorization-attribute user-role network-operator
authorization-attribute user-role 15
authorization-attribute user-role network-admin
#
local-user celanyhsj class manage
service-type ssh telnet terminal
authorization-attribute user-role network-admin
#
return
<H3C>
请问怎么配置
(0)
最佳答案
您好,请知:
以下是SSH的配置参考命令:
1、基础网络配置:
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]vlan 10
[H3C-vlan10]quit
[H3C]int vlan 10
[H3C-Vlan-interface10]ip address 192.168.124.254 24
[H3C-Vlan-interface10]quit
[H3C]int gi 1/0/1
[H3C-GigabitEthernet1/0/1]port link-type access
[H3C-GigabitEthernet1/0/1]port access vlan 10
[H3C-GigabitEthernet1/0/1]quit
2、创建管理员账号,并赋予最高权限,仅允许SSH登录
[H3C]local-user admin
New local user added.
[H3C-luser-manage-admin]password simple admin
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]quit
4、开启SSH功能
[H3C]ssh server enable
5、在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
(0)
我试试,谢谢
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
我试试,谢谢