- 积分
- 16840
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2022-5-15 22:33:31
|
显示全部楼层
Console口设置密码1 K( l0 ?/ S$ Z7 n" n- G
交换机Console口设置密码; e" x" g% K3 ]) S5 d3 D
[sw1]user-interface console 0) u: d/ H: C9 |% S$ W, Q
[sw1-ui-console0]authentication-mode password 9 g! x3 Z% H4 l: S+ A
[sw1-ui-console0]set authentication password ?1 `/ O Y9 G- q0 x
cipher Set the password with cipher text #密码用密码文本设置密码
& P/ J- S# }9 V, x0 l# h) a$ ~+ x6 B simple Set the password in plain text #简单地设置明文密码
$ }- o3 X6 s" J6 g8 o[sw1-ui-console0]set authentication password simple 123) h/ B" n6 R! Y+ U/ @
& Q/ V' C0 l8 x' O; H
路由器Console口设置密码
+ h0 k0 N4 E0 g3 {2 S% R7 L7 Q[R1]user-interface console 0
/ h9 c+ H- X1 s: j[R1-ui-console0]authentication-mode password
5 @; C! a1 @' M5 pPlease configure the login password (maximum length 16):123
6 K8 F$ D2 I `0 z' e[R1-ui-console0]
C& h; ^$ S) @2 M# `7 j[R1-ui-console0]q% }7 M. W* w$ Y1 ?" c# [; g
[R1]q
6 i( c0 C& m' A5 t4 E& {& f<R1>q- f3 K$ {1 H& r6 [
Configuration console exit, please press any key to log on
6 ]: r3 p% |: X/ H8 S! t
* y: e0 g! H: m2 O/ tLogin authentication
2 l7 J/ t; N' O0 f& u0 q: y( v; w
% `$ u* }& F4 q* g CPassword:输入123! K9 O6 h0 _ }$ b4 V
<R1>sys2 W% B+ V6 \" s3 O8 T4 ~& N
Enter system view, return user view with Ctrl+Z.( U2 ?, G& Z4 L+ e" y7 T
& _. j! y8 j7 {
' o \. L1 ?7 b' n: ]$ W
配置用户通过Telnet登录设备(真机演示)
2 I! M( H- D# |/ u9 B, C6 O5 [' ] r5 H( k[Huawei]int g0/0/0+ F/ n! D( _2 n9 t1 A/ Z
[Huawei-GigabitEthernet0/0/0]ip add 192.168.100.252 24 #先给需要接口设置IP
6 |# t" E9 T0 K4 J. ][Huawei]telnet server enable #全局开启telnet
" w1 g" r" |' VInfo: Telnet is insecure, recommended to use stelnet with encryption features.3 b# E# H7 x& ^9 J0 d# I
[Huawei]aaa
8 n! H% ?4 ?& L[Huawei-aaa]local-user pok password irreversible-cipher 123456 #创建本地用户,用户名:pok、密码:123456# K0 t d, s5 X+ s% J" b& s& o
Info: Add a new user.$ V2 k p; C' p$ s8 H+ c5 D8 i) r2 j
[Huawei-aaa]local-user pok service-type telnet #配置本地用户pok的接入类型为telnet$ l" o( i: E" R- h; l; b7 o6 ~( {5 l
[Huawei-aaa]local-user pok privilege level 3 #设置用户等级,远程用户缺省的级别都是0级,可修改Telnet用户登录后的用户级别为管理员3; a$ c. `( h- D( {! u6 n8 L
Warning: This operation may affect online users, are you sure to change the user privilege level ?[Y/N]y 确定$ u% n$ U/ f) J+ N9 ^
[Huawei-aaa]q( O' }1 m. B3 Q- ^, d
[Huawei]user-interface vty 0 4 #进入VTY0~VTY4用户界面视图
4 D* T3 t4 B' l% X% y% ], o" Z[Huawei-ui-vty0-4]authentication-mode aaa #配置VTY类型用户界面的验证方式为AAA* u |0 U/ P% I: L) O
1 j& b S+ n; ^( g- o" G
0 ^2 E: J, E) l
配置用户通过web登录设备(真机演示)! Y/ _/ \) K1 y, h! P! t* @: T
web登陆其实和上面基本是一样的。只是将上面代码中的:8 E8 s/ S* W$ S0 ]
local-user pokes service-type telnet
1 T- L! o* \% G4 M, r x0 _ t# X
' D; o1 {% u+ M+ \替换成
: H5 `( R- N# mlocal-user pokes service-type http ssh web
& S$ v( J" u ?3 @& \4 E% b2 Q ?' ~- `+ K6 V/ A' e q) Q
[Huawei]int g0/0/07 L! j* F* Q o( ], q
[Huawei-GigabitEthernet0/0/0]ip add 192.168.100.252 24 #先给需要接口设置IP
( p; s" W0 b9 }6 |[Huawei]http server enable #全局开启telnet9 j6 A. ^' y/ F% S7 m& q
Info: Telnet is insecure, recommended to use stelnet with encryption features.$ g& g9 y' f* \7 Q, `' J2 q
[Huawei]aaa
' ?4 _) e4 G8 }1 p8 W1 y[Huawei-aaa]local-user pok password irreversible-cipher 123456 #创建本地用户,用户名:pok、密码:123456 E- J4 J8 E; c& \% j3 M: F# S4 {% ]
Info: Add a new user.4 i7 o% D2 Z; Q$ N" @
[Huawei-aaa]local-user pok service-type http #配置本地用户pok的接入类型为telnet7 l- t! @( _( d) a4 B4 u3 d+ A4 \
[Huawei-aaa]local-user pok privilege level 3 #设置用户等级,远程用户缺省的级别都是0级,可修改Telnet用户登录后的用户级别为管理员3/ { S. t/ K1 o
Warning: This operation may affect online users, are you sure to change the user privilege level ?[Y/N]y 确定; B& K& y A4 P
[Huawei-aaa]q$ G; n% W6 A7 Q/ S
[Huawei]user-interface vty 0 4 #进入VTY0~VTY4用户界面视图- c% z/ P; m+ Z+ K3 E; i
[Huawei-ui-vty0-4]authentication-mode aaa #配置VTY类型用户界面的验证方式为AAA
h1 s3 z5 J) u3 V! T7 k& y; \
# z% I% S% g, D; f# z+ |( E+ n
. J. M/ M: y6 F: |6 l7 I- u说明:有个问题需要注意一下,替换完成之后就只能web登陆,不能同时登陆web和telnet。如果还需要web登陆,就需要再新建另一个用户。
2 }7 S. [4 e( a4 Q重点华为设备出厂的时候,对web访问的接口做了限制,我们必须查出来哪个接口可以web访问* o c% V0 z( n" n" U8 C2 R
display current-configuration filter http serve #查询哪个接口允许web访问; S# r9 b. y/ `0 W% v
#: |$ V' S t! \ ~
post-system
. T$ D; A, U! |/ u5 O http server enable" t* S9 R; @! V6 }3 @
http server permit interface GigabitEthernet0/0/1 #这个接口可以访问. l9 N% H8 a3 w6 c: _! A8 Z3 X
#3 ^' m) v# r9 d( b5 M( v Z$ l
return
, Y9 P. E" H. D) S+ o7 y
0 e7 ~+ n% d( q4 H5 Z3 K/ [1 T解决办法有两种:) y9 ^2 ]; [, N9 t
undo http server permit interface #删除限制
: ]7 ~* Z3 d( M; Z0 V" u) t, A! \% |http server permit interface e0/0/0 #允许你的接口访问web
0 p* t/ d; d% [# D
$ j1 n% A9 w/ o: x. c& d; T在这里我想说的是,华为的web界面真的是很差,我用的真机AR1220,不知道新版的怎么样。建议还是用命令把。
9 L f9 ~8 \7 j4 Z( a
& ]& U; w. P" @8 S0 I, N% d |
|