|
|
楼主 |
发表于 2022-5-16 13:07:44
|
显示全部楼层
<Quidway> system-view
9 C4 }' n2 r+ W2 x[Quidway] interface MEth 0/0/1# w/ t* V7 j) |# U, x: x. Y
[Quidway] interface MEth 0/0/1 1 L9 w; V: c9 t, ]( ]$ h2 r
[Quidway-MEth0/0/1]ip address x.x.x.x 255.255.255.0 ///设置MEth管理端⼝的ip地址- q/ J0 U7 I. [
[Quidway-MEth0/0/1]quit
% m; g/ p% {" ~. R N[Quidway]ip route-static 0.0.0.0 0.0.0.0 x.x.x.x(gateway)2 A% N- m, Y1 d4 w( V. B/ r
[Quidway-MEth0/0/1]display ip interface MEth 0/0/1 ///查看MEth管理端⼝的配置信息) x: V3 w! G% u3 z. m
[Quidway] $ N/ Q7 R2 ], ^% M* |2 }. y/ P
添加⽤户,设置ssh telent远程登录5 E7 Q7 m% r% n% d- S7 P7 b" G0 R
<Quidway> system-view ///进⼊系统配置模式
- @; }( |) E9 X[Quidway]aaa ///进⼊AAA模式6 C2 @, A2 L/ }* [/ Z1 _
[Quidway-aaa]local-user chy password cipher qaz123456 ///设置本地⽤户名和密码 cipher加密
1 A- t) U! N$ g+ j; o2 |' h: M% u[Quidway-aaa]local-user chy service-type ssh telnet ///设置⽤户设置登录ssh telnet服务
; s7 q b' [2 C: ~. q/ y- h: Y[Quidway-aaa]display ssh server status///查看ssh服务是否⽣效1 c! ~ R, z9 c: Q* P
[Quidway-aaa]display telnet server status ///查看telnet服务是否⽣效$ n& ~7 P( K, F* P1 U6 X
[Quidway-aaa]local-user chy privilege level 15 ///设置⽤户级别
1 B+ t: b" C: G3 M# i[Quidway-aaa]q ///退出AAA模式
" Y3 t# c) {0 t" w& {( f- l2 Z设置vty 0 4远程登陆的虚拟端⼝( _6 _! H7 x3 M: O; _
VTY是路由器的远程登陆的虚拟端⼝,0 4表⽰可以同时打开5个会话,line vty 0 4是进⼊VTY端⼝,对VTY端⼝进⾏配置,⽐如说配置密
1 o- c. ]+ M7 d码,或者ACL.: F' Q- `. B9 d/ B* ~9 @! X9 v: k0 M
[Quidway]user-interface vty 0 4 ///进⼊vty 0 4远程虚拟端⼝
8 z' e/ I; t, h- h7 g" p3 I5 c[Quidway-ui-vty0-4]authentication-mode aaa ///为虚拟⽤户终端配置AAA⾝份验证模式
4 x4 a, M/ d" r5 q' j/ o5 |% n) I[Quidway-ui-vty0-4]user privilege level 15 ///为虚拟⽤户终端配置⽤户级别 j3 t, D' U7 ?& v/ v/ Q; ~
[Quidway-ui-vty0-4]protocol inbound all ///为虚拟⽤户终端配置使⽤的协议,all即都⽀持6 b7 E8 C/ a' c( s9 `( [! p9 k1 W
[Quidway-ui-vty0-4]protocol inbound telnet ///为虚拟⽤户终端配置telnet协议,即可以使⽤telnet远程登录
6 K, R% _2 t6 X% Y# E* m. P6 Z[Quidway-ui-vty0-4]protocol inbound ssh ///为虚拟⽤户终端配置ssh协议,即⽤户可以使⽤ssh远程登录+ \0 o' V) @1 o3 y" a
[Quidway]ssh user chy authentication-type password ///为chy⽤户设置ssh认证为password,此命令对设置单⼀⽤户设置来说⽐较实⽤
7 M* S/ M! U. L E. ^7 J* b[Quidway]ssh authentication-type default password ///设置ssh默认的认证⽅式为密码认证,对设置多个⽤户来说很实⽤& v' S% v3 c. o! X% W; U* K
[Quidway]ssh user chy service-type stelnet ///为chy⽤户设置ssh认证服务类型为stelnet w& r( y* {& D5 G
[Quidway]display ssh user-information chy ///查看ssh服务chy⽤户的配置信息
$ Y% l4 S" R0 b* B3 y1 o( d: p[Quidway]q///退出系统设置视图
: n% m$ l' k% H: y D<Quidway>save///保存设置
) {' K+ H/ b# v8 i# }. b- ~8 _' N" |% a, ]1 y' R( z) U r
|
|