第一步:配置用戶名密碼
R2(config)#username admin privilege 15 password admin
R2(config)#username cisco autocommand show ip int b
R2(config)#username cisco password cisco
R2(config)#line vty 0 4
R2(config-line)# login localide
第二步:驗證admin用戶
R1#telnet 12.0.0.2
Trying 12.0.0.2 ... Openip
User Access Verificationci
Username: admin
Password:
R2#
(已經成功遠程登陸到R2)
第三步:驗證cisco用戶,上面配置此用戶只能查看show ip int b命令it
R1#telnet 12.0.0.2
Trying 12.0.0.2 ... Openio
User Access Verificationast
Username: cisco
Password:
(輸入密碼後直接運行命令)
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 12.0.0.2 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
[Connection to 12.0.0.2 closed by foreign host]class