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

23.2. 基础操作

23.2.1. 登陆

			
[root@localhost ~]# telnet 192.168.4.4
Trying 192.168.4.4...
Connected to 192.168.4.4.
Escape character is '^]'.

******************************************************************************
* Copyright (c) 2004-2008 Hangzhou H3C Tech. Co., Ltd. All rights reserved.  *
* Without the owner's prior written consent,                                 *
* no decompiling or reverse-engineering shall be allowed.                    *
******************************************************************************


Login authentication


Username:neo
Password:
<Netkiller>
			
			

23.2.2. 创建用户

			

创建用户neo密码chen,并允许telnet登陆

			
local-user neo
 password simple chen
 authorization-attribute level 3
 service-type ssh telnet terminal
 service-type ftp
			
			

23.2.3. 开启SSH服务

[Netkiller]ssh server enable
Info: Enable SSH server.
			

测试登陆

			
[devops@master ~]$ ssh neo@192.168.4.4
neo@192.168.4.4's password:

******************************************************************************
* Copyright (c) 2004-2008 Hangzhou H3C Tech. Co., Ltd. All rights reserved.  *
* Without the owner's prior written consent,                                 *
* no decompiling or reverse-engineering shall be allowed.                    *
******************************************************************************

<Netkiller>
			
			

23.2.4. 开启FTP服务

[Netkiller]ftp server enable
			

23.2.5. 保存配置

[Netkiller]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
 Validating file. Please wait........................
 Configuration is saved to device successfully.
[Netkiller]
			

使用curl命令链接ftp列出目录

[root@localhost ~]# curl -l ftp://neo:password@192.168.4.4
main.bin
2003_ca.cer
2003_server.pfx
navigator_ca.cer
navigator_local.cer
config.cwmp
system.xml
startup.cfg

			

使用curl查看配置文件

[root@localhost ~]# curl ftp://neo:chen@192.168.4.4/startup.cfg

#
 version 5.20, ESS 1710
#
 sysname Netkiller
#
 tcp syn-cookie enable
 tcp anti-naptha enable
 tcp state closing connection-number 500
 tcp state established connection-number 500
 tcp state fin-wait-1 connection-number 500
 tcp state fin-wait-2 connection-number 500
 tcp state last-ack connection-number 500
 tcp state syn-received connection-number 500
#
 ipsec cpu-backup enable
#
 domain default enable system
#
 dns resolve
 dns proxy enable
 dns server 202.96.134.133
#
 telnet server enable
#
 port-security enable
#
 mac-authentication domain system
#
vlan 1
#
domain system
 authentication lan-access local
 access-limit disable
 state active
 idle-cut disable
 self-service-url disable
#
pki domain navigator
  crl check disable
#
ike proposal 1
 encryption-algorithm 3des-cbc
 dh group5
#
ike peer navigator
 pre-shared-key cipher uqWUC2uW1wbDFIn0NObiHg==
#
ipsec proposal navigator
 encapsulation-mode transport
 esp authentication-algorithm sha1
 esp encryption-algorithm 3des
#
ipsec proposal navigator1
 esp authentication-algorithm sha1
 esp encryption-algorithm 3des
#
ipsec policy-template gateway 1
 ike-peer navigator
 proposal navigator navigator1
#
ipsec policy navigator 1 isakmp template gateway
#
dhcp server ip-pool vlan1 extended
 network ip range 172.16.1.30 192.168.1.200
 network mask 255.255.255.0
 gateway-list 172.16.1.254
 dns-list 114.114.114.114 114.114.115.115
 domain-name netkiller.github.io
#
user-group system
#
local-user neo
 password simple chen
 authorization-attribute level 3
 service-type ssh telnet terminal
 service-type ftp
#
wlan rrm
 dot11b mandatory-rate 1 2
 dot11b supported-rate 5.5 11
 dot11g mandatory-rate 1 2 5.5 11
 dot11g supported-rate 6 9 12 18 24 36 48 54
#
wlan service-template 1 crypto
 ssid http://netkiller.github.io
 cipher-suite tkip
 security-ie rsn
 service-template enable
#
wlan service-template 2 crypto
 ssid http://netkiller.sf.net
 cipher-suite ccmp
 security-ie rsn
 service-template enable
#
ssl server-policy chinanet
 pki-domain navigator
#
cwmp
 cwmp acs username netkiller password netkiller
 cwmp cpe inform interval enable
 cwmp cpe inform interval 43200
 cwmp cpe username neo password neo
#
interface Aux0
 async mode flow
 link-protocol ppp
#
interface Ethernet0/0
 port link-mode route
 nat outbound
 ip address 192.168.4.4 255.255.255.0
#
interface NULL0
#
interface Vlan-interface1
 ip address 172.16.1.254 255.255.255.0
 dhcp server apply ip-pool vlan1
#
interface Ethernet0/1
 port link-mode bridge
#
interface Ethernet0/2
 port link-mode bridge
#
interface Ethernet0/3
 port link-mode bridge
#
interface Ethernet0/4
 port link-mode bridge
#
interface WLAN-BSS0
 port-security port-mode psk
 port-security tx-key-type 11key
 port-security preshared-key pass-phrase 13113668890
#
interface WLAN-BSS1
#
interface WLAN-Radio2/0
 service-template 1 interface wlan-bss 0
#
policy-based-route Ethernet0/0 permit node 0
   if-match acl 2000
   apply output-interface Ethernet0/0
#
 ip route-static 0.0.0.0 0.0.0.0 Ethernet0/0 192.168.4.254
#
 dhcp enable
#
 ip https ssl-server-policy chinanet
 ip https enable
#
 nms primary monitor-interface Ethernet0/0
#
 load xml-configuration
#
user-interface aux 0
user-interface vty 0 4
 authentication-mode scheme
#

			

保存配置文件到startup.cfg文件

# curl ftp://neo:chen@192.168.4.4/startup.cfg > startup.cfg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3450    0  3450    0     0   2852      0 --:--:--  0:00:01 --:--:--  2853
			





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

相关文章:

  • Kubernetes系统架构简介[转]
  • Jenkins+Jmeter持续集成笔记(三:集成到Jenkins)
  • [译]使用 Siesta 处理 Swift 网络请求
  • 33.3. nanomsg
  • Salesforce收购数据库创业公司Attic Labs
  • 数组 类型 在 存储过程中 使用
  • 基于TableStore/MaxCompute的数据采集分析系统介绍
  • think php框架接入微信支付中需要注意的问题(php 小白适用)
  • 第一章
  • 分布式文件系统FastDFS如何做到高可用
  • Vmware Workstation及Centos6.8 的安装
  • Android系统shell中的clear命令实现【转】
  • 剑指offer15
  • iOS开发_记录调用系统应用
  • JavaScript异步流程控制的前世今生
  • [LeetCode] Wiggle Sort
  • axios请求、和返回数据拦截,统一请求报错提示_012
  • Computed property XXX was assigned to but it has no setter
  • 从零开始的无人驾驶 1
  • 第2章 网络文档
  • 多线程 start 和 run 方法到底有什么区别?
  • 区块链共识机制优缺点对比都是什么
  • 【运维趟坑回忆录】vpc迁移 - 吃螃蟹之路
  • 数据库巡检项
  • ​一、什么是射频识别?二、射频识别系统组成及工作原理三、射频识别系统分类四、RFID与物联网​
  • ​直流电和交流电有什么区别为什么这个时候又要变成直流电呢?交流转换到直流(整流器)直流变交流(逆变器)​
  • # 达梦数据库知识点
  • # 学号 2017-2018-20172309 《程序设计与数据结构》实验三报告
  • #!/usr/bin/python与#!/usr/bin/env python的区别
  • #周末课堂# 【Linux + JVM + Mysql高级性能优化班】(火热报名中~~~)
  • (1/2) 为了理解 UWP 的启动流程,我从零开始创建了一个 UWP 程序
  • (3)(3.2) MAVLink2数据包签名(安全)
  • (C语言)二分查找 超详细
  • (delphi11最新学习资料) Object Pascal 学习笔记---第8章第5节(封闭类和Final方法)
  • (八)Flask之app.route装饰器函数的参数
  • (二)WCF的Binding模型
  • (附表设计)不是我吹!超级全面的权限系统设计方案面世了
  • (附源码)计算机毕业设计ssm基于B_S的汽车售后服务管理系统
  • (教学思路 C#之类三)方法参数类型(ref、out、parmas)
  • (七)Java对象在Hibernate持久化层的状态
  • (转)微软牛津计划介绍——屌爆了的自然数据处理解决方案(人脸/语音识别,计算机视觉与语言理解)...
  • (转)重识new
  • .bat批处理(六):替换字符串中匹配的子串
  • .Net core 6.0 升8.0
  • .NET Project Open Day(2011.11.13)
  • .net 验证控件和javaScript的冲突问题
  • .NET/C# 使用 ConditionalWeakTable 附加字段(CLR 版本的附加属性,也可用用来当作弱引用字典 WeakDictionary)
  • .net中生成excel后调整宽度
  • @for /l %i in (1,1,10) do md %i 批处理自动建立目录
  • [APIO2015]巴厘岛的雕塑
  • [BZOJ4337][BJOI2015]树的同构(树的最小表示法)
  • [C/C++] -- 二叉树
  • [CISCN2019 华北赛区 Day1 Web2]ikun
  • [Enterprise Library]调用Enterprise Library时出现的错误事件之关闭办法
  • [GN] 后端接口已经写好 初次布局前端需要的操作(例)