阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

H3C路由器登录管理

131次阅读
没有评论

共计 3328 个字符,预计需要花费 9 分钟才能阅读完成。

一、本地用户 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//服务类型,权限为 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

H3C 路由器登录管理

 

缺省情况下,用户使用 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…

…++..++…++..++…++…++…++..++.+++++++++.+++++++

连接一下看看如下;

H3C 路由器登录管理

 

H3C 路由器登录管理

 

H3C 路由器登录管理

 

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…\

TFTP: 360 bytes received in 0 second(s)

File downloaded successfully.

<H3C>dir

Directory of flash:/

0 drw- – Mar 12 2013 13:11:12 logfile

1 -rw- 360 Mar 12 2013 15:17:09 identity.pub

2540 KB total (2507 KB free)

 

[H3C]public-key peer sshpub import sshkey Identity.pub //将导入的公钥 转换为 RSA格式sshpub

[H3C]ssh server enable

[H3C]ssh user zzx service-type stelnet authentication-type publickey assign publickey sshpub

//SSH用户 zzx 的服务类型为stelnet、使用公钥认证,并且为该用户名分配生成的公钥sshpub

登录时 勾掉 密码 这一项

H3C 路由器登录管理

 

 

四、radius进行 telnet 验证

[H3C]telnet server enable //打开 Telnet 服务器,缺省关闭,必须打开

[H3C]radius scheme telnetlogin //创建 RADIUS 方案

[H3C-radius-telnetlogin]primary authentication 192.168.10.1 //配置验证的服务器地址与共享密钥

[H3C-radius-telnetlogin]key authentication test

[H3C-radius-telnetlogin]user-name-format without-domain

[H3C-radius-telnetlogin]server-type standard

//Telnet用户属于 Login 类型,引用 RADIUS 方案test,不进行计费

[H3C]domain system

[H3C-isp-system]authentication login radius-scheme telnetlogin

[H3C-isp-system]authorization login radius-scheme telnetlogin

[H3C-isp-system]accounting optional

//设置 scheme 认证

[H3C]user-interface vty 0 4

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

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

在配置相应的接口

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计3328字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中