当前位置: 首页 > news >正文

H3C路由器登录管理

一、本地用户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...\

  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

登录时 勾掉密码这一项

四、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

在配置相应的接口



本文转自 abc16810 51CTO博客,原文链接:http://blog.51cto.com/abc16810/1152736

相关文章:

  • Laravel5.1 条件性验证
  • Redhat7 增加swap分区
  • 进程调度器--UNIX还是是老大
  • 监控apache脚本原理
  • JAVA与.NET的相互调用——利用JNBridge桥接模式实现远程通讯
  • 13.liunx机器互相登录
  • nginx配置虚拟主机
  • mysql日志文件在哪
  • 21天让你成为Horizon View高手—Day7:配置View Connection Server
  • c用libcurl库实现https下get/post网络通信
  • bootstrap标题效果
  • nmap的用法
  • java 二叉树 深度优先递归遍历
  • 基于nginx部署app下载服务器
  • itunes Connect 未能创建 App 图标
  • IE9 : DOM Exception: INVALID_CHARACTER_ERR (5)
  • [原]深入对比数据科学工具箱:Python和R 非结构化数据的结构化
  • 【Redis学习笔记】2018-06-28 redis命令源码学习1
  • ComponentOne 2017 V2版本正式发布
  •  D - 粉碎叛乱F - 其他起义
  • Elasticsearch 参考指南(升级前重新索引)
  • JDK 6和JDK 7中的substring()方法
  • MySQL Access denied for user 'root'@'localhost' 解决方法
  • python学习笔记 - ThreadLocal
  • SpringBoot 实战 (三) | 配置文件详解
  • Vue 重置组件到初始状态
  • vue.js框架原理浅析
  • 好的网址,关于.net 4.0 ,vs 2010
  • 解决jsp引用其他项目时出现的 cannot be resolved to a type错误
  • 猫头鹰的深夜翻译:Java 2D Graphics, 简单的仿射变换
  • 浅谈Kotlin实战篇之自定义View图片圆角简单应用(一)
  • 思考 CSS 架构
  • 微服务框架lagom
  • 小程序开发中的那些坑
  • 原生 js 实现移动端 Touch 滑动反弹
  • 原生Ajax
  • 在Mac OS X上安装 Ruby运行环境
  • 正则学习笔记
  • JavaScript 新语法详解:Class 的私有属性与私有方法 ...
  • Play Store发现SimBad恶意软件,1.5亿Android用户成受害者 ...
  • ​Z时代时尚SUV新宠:起亚赛图斯值不值得年轻人买?
  • # Java NIO(一)FileChannel
  • ## 临床数据 两两比较 加显著性boxplot加显著性
  • #我与Java虚拟机的故事#连载13:有这本书就够了
  • (搬运以学习)flask 上下文的实现
  • (附源码)springboot人体健康检测微信小程序 毕业设计 012142
  • (三)mysql_MYSQL(三)
  • (转载)虚函数剖析
  • ****Linux下Mysql的安装和配置
  • .aanva
  • .NET的微型Web框架 Nancy
  • .net分布式压力测试工具(Beetle.DT)
  • .net企业级架构实战之7——Spring.net整合Asp.net mvc
  • @font-face 用字体画图标
  • [20170705]lsnrctl status LISTENER_SCAN1