远程管理交换机(telnet ssh)

1、telnet

是应用层协议,基于传输层TCP,默认端口号:23,采用的是明文密码方式,不是很安全,一般用于内网管理。

2、ssh

是应用层协议,基于传输层TCP,默认端口号22,采用的是密文密码方式,相对来讲比较安全,经常用于跨越互联网管理,也常用于远程管理Linux操作系统

3、思路

  • 既然是通过网络的方式进行管理设备,设备就必须配置IP地址,由于交换机上的接口都是交换接口,是不允许配置IP地址,直接为交换机的虚接口配置IP地址,默认情况下交换机的默认虚接口就是vlan1接口

Switch(config)#int vlan1
Switch(config-if)#ip address 192.168.100.100 255.255.255.0
Switch(config-if)#no shutdown

  • 配备设备的连接终端并直接设置密码,应用

Switch#conf t
Switch(config)#line vty 0 4
Switch(config-line)#password woniu123
Switch(config-line)#login #表示直接使用密码登录

  • 创建连接用户名密码,配置设备的连接终端并应用

Switch#conf t
Switch(config)#username LVbo password 520520
Switch(config)#line vty 0 4
Switch(config-line)#login local #表示使用用户名密码登录

ssh

Switch(config)#hostname SW1
SW1(config)#ip domain-name LVbo.com
SW1(config)#crypto key generate rsa
The name for the keys will be: SW1.LVbo.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]:
% Generating 512 bit RSA keys, keys will be non-exportable…[OK]
SW1(config)#ip ssh time-out 120
SW1(config)#ip ssh aut
SW1(config)#ip ssh authentication-retries 5
SW1(config)#username LVbo password 520520
SW1(config)#line vty 0 4
SW1(config-line)#login local

4、设置特权模式密码

SW1(config)#enable password 520520
SW1(config)#enable secret 1314
SW1#show running-config #查看当前配置文件命令

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值