Switch>en
Switch#conf t
Switch(config)#hostname SW1
Switch(config)#enable password cisco //Assign the privileged level password
Switch(config)#line vty 0 4
Switch(config-line)#login% Login disabled on line 2, until 'password' is set% Login disabled on line 3, until 'password' is set% Login disabled on line 4, until 'password' is set% Login disabled on line 5, until 'password' is set% Login disabled on line 6, until 'password' is set
Switch(config-line)#password qytang //设置远程密码
Switch(config-line)#transport input telnet //Define which protocols to use when connecting to the terminal server
在R1上验证
Router#telnet 10.1.11.2
Trying 10.1.11.2 ... Open
User Access Verification
Password:
SW1>en
Password:
SW1#
SW1#show users
Line User Host(s) Idle Location
0 con 0 idle 00:04:19
* 2 vty 0 idle 00:00:00
SW1#show tcp brief
TCB Local Address Foreign Address (state)
F08624F8 10.1.11.2.23 10.1.11.1.64423 ESTAB
配置R1可以远程登录SW1实验图如下SW1配置Switch>enSwitch#conf tSwitch(config)#hostname SW1Switch(config)#enable password cisco //Assign the privileged level passwordSwitch(config)#line vty 0 4Switch(config-line)#login% Login disabled on line 2, until 'password