开启交换机telnet的命令步骤:
第一步:给telnet登陆配置密码:
Switch>
Switch>en
Switch#conft
Enter configuration commands, on
Switch(config)#lin
Switch(config)#line vt
Switch(config)#line vty 04
Switch(config-line)#passw
Switch(config-line)#password123456
Switch(config-line)#login
Switch(config-line)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Switch#cop rs
Destination filename [startup-config]?
Building configuration...
[OK]
第二步:telnet密码虽然配置成功了,可是一想,IP还没配置啊,telnet登陆谁呢?~!
test02#
Enter configuration commands, on
test02(config)#int vlan1
test02(config-if)#ip add 10.1.1.1255.255.255.0
test02(config-if)#noshutdown
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changedstate to up
test02(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
test02#cop rs
第三步:现在看来telnet是有目标IP地址了,也有telnet登陆时候的密码了,但是我在telnet的时候虽然成功了,但是又出现了令一个问题,我无法由用户模式进入特权模式:
PC>telnet 10.1.1.1
Trying 10.1.1.1 ...
User Access Verification
Password:
test02>en
% No password set
test02>en
% No password set
test02>?
Exec commands:
test02>enable
% No password set
总是提示我没有设置密码;可见,通过telnet登陆交换机,还需要提高从用户模式到特权模式的密码,如果不设置密码,还是不能成功远程登陆一台交换机的。于是:
第四步:在交换机控制台设置从用户模式到特权模式的密码:
test02> en
test02#conf t
Enter configuration commands, on
test02(config)#ena
test02(config)#enable pas
test02(config)#enable password 234567
test02(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
test02#cop r s
Destination filename [startup-config]?
Building configuration...
[OK]
然后在从远端pc登陆交换机,操作步骤及其显示结果如下:
PC>telnet 10.1.1.1
Trying 10.1.1.1 ...
User Access Verification
Password:
test02>en
Password:
test02#conft
Enter configuration commands, on
test02(config)#
最后再多说几个知识点:
设置使用console线登陆的密码:
一.设置console密码
>enable
#configure trminal
(confing)#line console0
(config-line)#password
(config-line)#login
(config-line)#exit