新手学telnet远程登录与console口配置

来源:互联网 发布:reminder 软件 编辑:程序博客网 时间:2024/05/21 07:06
本文技术实现来自
http://www.xuexun.com/C_10631.shtml第三章内容文档
----------------------------------------昏割线---------------------------------------------------------------
条件:必须处于同一网段或为ip地址设置子网掩码;设置远程登录密码(步骤2为非必须)
1.配置交换机的管理ip地址并开启端口
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown

%LINK-5-CHANGED: Interface Vlan1, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#end
Switch#
2.配置进入特权模式密码
Switch#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#enable password 123456
3.配置telnet远程登录密码
Switch(config)#line vty 0 4
Switch(config-line)#password liuzhen
Switch(config-line)#login
Switch(config-line)#end
Switch#
4.查看配置内容
Switch#show run
Building configuration...

Current configuration : 1003 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable password 123456
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
!
!
line con 0
!
line vty 0 4
password liuzhen
login
line vty 5 15
login
!
!
end
5.配置主机ip地址
6.远程登录时,先输入vty远程登录密码,可进入一般用户模式,再输入进入特权模式密码,进入特权模式。console登录时不用设置vlan的ip地址
补充:
条件中步骤二非必须:必须设置进入特权模式密码才可远程进入特权模式:
Switch>en
% No password set.


0 0
原创粉丝点击