欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

如何轻松操作H3C路由器进行登录与管理

最编程 2024-02-22 15:53:08
...

一、本地用户Telnet登录管理(模拟器实验)

1、在配置之前要添加一个以太网接口,默认是桥接到本地的网卡上(建议添加一个微软的逻辑口,并禁用本地物理网卡,让它桥接到逻辑接口上) 也可以编辑路由器的配置文件“hardcfg.tcl”添加代码“AddEthernet -index 1”,在启动路由器即可!!

<H3C>format flash:    //要想保存数据 ,必须格式化

All data on flash: will be lost , proceed with format ? [Y/N]:y

./

%Format flash: completed.

<H3C>system-view 

[H3C]telnet server enable    //启动telnet服务

[H3C]password-control length 4   //默认密码长度为10,这里设为4

[H3C]local-user zzx     //添加一个用户

New local user added.

[H3C-luser-zzx]password simple admin   //密码

Updating user(s) information, please wait....

[H3C-luser-zzx]service-type telnet level 3   //服务类型 ,权限为即管理级别(有的是命令authorization-attribute level 3

[H3C-luser-zzx]quit

[H3C]user-interface vty 0 4   //设置同时登录的用户为5

[H3C-ui-vty0-4]authentication-mode scheme   //验证用户名和密码

[H3C-ui-vty0-4]quit

[H3C]inter Ethernet 0/1/0       //配置接口地址

[H3C-Ethernet0/1/0]ip add 192.168.10.10 255.255.255.0

缺省情况下,用户使用Telnet方式登录设备,通过口令验证后,只能使用级别为0的命令。 如果想使用1,2,3级别的命令可以配置super  password xxxx  来实现

或者通过验证密码

[H3C] user-interface vty 0 4

[H3C-ui-vty0-4] authentication-mode password

[H3C-ui-vty0-4] set authentication password cipher 123

[H3C-ui-vty0-4] user privilege level 2    //在这里指明级别

二、本地用户console登录管理

(不同之处)

[H3C-luser-zzx]service-type terminal    //设置服务类型为terminal

[H3C]user-interface con 0

[H3C-ui-vty0-4]authentication-mode scheme //设置scheme认证

三、SSH方式登录管理

1、验证方式为pasword认证

[H3C]local-user zzx     //创建本地账号

[H3C-luser-zzx]password simple zzx123   

[H3C-luser-zzx]service-type ssh   //服务类型为ssh

[H3C-luser-zzx]level 3     //级别为3

[H3C]inter Ethernet 0/1/0       //配置接口地址

[H3C-Ethernet0/1/0]ip add 192.168.10.10 255.255.255.0

[H3C]ssh server enable   //开启ssh服务  

[H3C]ssh user zzx service-type stelnet  authentication-type password  //SSH用户client1的服务类型为stelnet,即安全Telnet,使用密码认证方式

[H3C]public-key  local create rsa   //生成本地密钥对并指定密钥长度

The range of public key size is (512 ~ 2048).      

NOTES: If the key modulus is greater than 512,      

It will take a few minutes.     

Press CTRL+C to abort.

Input the bits of the modulus[default = 1024]:

Generating Keys...

...++..++...++..++...++...++...++..++.+++++++++.+++++++

连接一下看看如下;

2、验证方式为公钥认证

[H3C]public-key  local create rsa   //生成1024位的rsa本地密钥对

The range of public key size is (512 ~ 2048).      

NOTES: If the key modulus is greater than 512,      

It will take a few minutes.     

Press CTRL+C to abort.

Input the bits of the modulus[default = 1024]:

Generating Keys...

...++..++...++..++...++...++...++..++.+++++++++.+++++++

<H3C>tftp 192.168.10.1 get Identity.pub   //导入公钥.(公钥是用Secure CRT软件创建的)

  File will be transferred in binary mode 

  Downloading file from remote TFTP server, please wait...\

上一篇: 【AIGC】开源声音克隆GPT-SoVITS

下一篇: 快速上手H3C模拟器的简易操作指南

推荐阅读