远端登录基础配置实验

发布于:2024-08-23 ⋅ 阅读:(91) ⋅ 点赞:(0)

1.作用

  • 方便远程管理,并且传统的console线只能一个用户访问,而远程管理的协议,可以多用户同时登录。

2.基础远程管理方式

  • Telnet 协议
            telnet协议提供了一种通过终端远程登录到服务器的方式,可以远程对设备进行配置和管理。
  • SSH协议
            是一种网络安全协议,通过加密和认证机制实现安全的访问和文件传输等业务。

3.两种协议不同点

  • Telnet 是明文协议,所有的数据都以明文的方式发送,不安全。
  • SSH 是密文协议,数据经过加密后再发送,安全性更高。

4.实验基础搭建

  • 拓扑打通

  • 代码:
# R1 	
<Huawei>system-view 
[Huawei]undo info-center enable 
[Huawei]sysname client
[client]interface g0/0/0
[client-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[client-GigabitEthernet0/0/0]q

# R2
<Huawei>system-view 
[Huawei]undo info-center enable 
[Huawei]sysname far-end
[far-end]interface g0/0/0
[far-end-GigabitEthernet0/0/0]ip add 192.168.1.254 24
  • 验证图:

5.Telnet 协议实验

  • 代码:
# R2
[far-end]user-interface vty 0 4
[far-end-ui-vty0-4]authentication-mode aaa
[far-end-ui-vty0-4]q
[far-end]aaa
[far-end-aaa]local-user ZC password cipher ZCBZC
[far-end-aaa]local-user ZC privilege level 3
[far-end-aaa]local-user ZC service-type telnet
[far-end-aaa]
<far-end>
  • 验证图:

6.SSH 协议实验

  • 代码:
R2:
<far-end>system-view 
[far-end]stelnet server enable 
[far-end]rsa local-key-pair create 
The key name will be: Host
% RSA keys defined for Host already exist.
Confirm to replace them? (y/n)[n]:y
Input the bits in the modulus[default = 512]:

[far-end]aaa
[far-end-aaa]local-user ZC-SSH password cipher ZCBZC
[far-end-aaa]l	
[far-end-aaa]local-user ZC-SSH privilege level 2
[far-end-aaa]local-user ZC-SSH service-type ssh
[far-end-aaa]q
[far-end]user-interface vty 0 4
[far-end-ui-vty0-4]protocol inbound ssh
[far-end-ui-vty0-4]q
[far-end]ssh user ZC-SSH authentication-type all
[far-end]
  • 验证图:


网站公告

今日签到

点亮在社区的每一天
去签到