Huawei-R&S-网络工程师实验笔记20190530-FTP上传下载、STelnet登录、SFTP登录
》Huawei-R&S-网络工程师实验笔记20190530-FTP上传下载、STelnet登录、SFTP登录
》》实验开始,参考《Huawei-R&S-网络工程师实验笔记20190524-XXX》中的拓扑图,使用 Huawei eNSP、Wireshark、Oracle VM VirtualBox 等工具软件,并开启了左侧、右侧的路由器AR1、AR2。以下将全部使用代码展示实验过程和理解:
<AR2>sy
Enter system view, return user view with Ctrl+Z.
[AR2]int g0//
[AR2-GigabitEthernet0//]ip address 202.100.1.4
[AR2-GigabitEthernet0//]
May ::-: AR2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[AR2-GigabitEthernet0//]q
[AR2]dis ip int bri //查看IP是否配置,要保证与AR1可以互通(AR1设备配置同样动作)
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// 202.100.1.4/ up up //在AR1中ping后发现不通
GigabitEthernet0// unassigned down down
GigabitEthernet0// unassigned down down
NULL0 unassigned up up(s)
[AR2]
[AR2]int g0//
[AR2-GigabitEthernet0//]ip address 202.100.1.2 //重新配置IP,并在AR1中ping看看
[AR2-GigabitEthernet0//]q
[AR2]q
[AR2]ftp server enable //开启FTP功能
Info: Succeeded in starting the FTP server
[AR2]aaa
[AR2-aaa]local-user tangjun password cipher //用户名tangjun和密码123(cipher保密模式)
Info: Add a new user.
[AR2-aaa]local-user tangjun privilege level //该用户的级别15
[AR2-aaa]local-user tangjun ftp ? //ftp目录是哪,?查询后续命令
STRING<-> [drive][path]
flash: Device name
[AR2-aaa]local-user tangjun ftp flash: //有版本命令是local-user tangjun ftp-directory flash:
[AR2-aaa]local-user tangjun service-type ftp //该用户服务于FTP
[AR2-aaa]q
[AR2]q
<AR2>save updatafile.zip //保存个配置文件,假定为升级文件,用后续FTP实验
Are you sure to save the configuration to updatafile.zip? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<AR2>dir
Directory of flash:/ Idx Attr Size(Byte) Date Time(LMT) FileName
drw- - May :: dhcp
-rw- , May :: portalpage.zip
-rw- May :: updatafile.zip //升级文件成功创建,将会被拷贝至AR1的根目录下
-rw- , May :: statemach.efs
-rw- , May :: sslvpn.zip
-rw- May :: private-data.txt
-rw- May :: vrpcfg.zip ,, KB total (, KB free)
<AR2>
<AR1>sy
Enter system view, return user view with Ctrl+Z.
[AR1]int g0//
[AR1-GigabitEthernet0//]ip address 202.100.1.1
May ::-: AR1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[AR1-GigabitEthernet0//]q
[AR1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// 202.100.1.1/ up up //接口配置好了IP
GigabitEthernet0// unassigned up down
GigabitEthernet0// unassigned down down
NULL0 unassigned up up(s)
[AR1]ping 202.100.1.4
PING 202.100.1.4: data bytes, press CTRL_C to break //无法连通AR2接口,其IP地址配置错误
Request time out
Request time out
Request time out
Request time out
Request time out
--- 202.100.1.4 ping statistics ---
packet(s) transmitted
packet(s) received
100.00% packet loss [AR1]ping 202.100.1.2 //对端设备AR2已重新配置IP,现在重新ping
PING 202.100.1.2: data bytes, press CTRL_C to break
Reply from 202.100.1.2: bytes= Sequence= ttl= time= ms
Reply from 202.100.1.2: bytes= Sequence= ttl= time= ms
Reply from 202.100.1.2: bytes= Sequence= ttl= time= ms
Reply from 202.100.1.2: bytes= Sequence= ttl= time= ms
Reply from 202.100.1.2: bytes= Sequence= ttl= time= ms
--- 202.100.1.2 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // ms //AR1与AR2网络连通了
[AR1]
<AR1>ftp 202.100.1.2 //通过FTP程序连接到服务器
Trying 202.100.1.2 ... Press CTRL+K to abort
Connected to 202.100.1.2.
FTP service ready.
User(202.100.1.2:(none)):tangjun //输入用户名
Password required for tangjun.
Enter password: //输入密码
User logged in. [AR1-ftp]get updatafile.zip //获取数据文件
Port command okay.
Opening ASCII mode data connection for updatafile.zip.
Transfer complete. //传输成功
FTP: byte(s) received in 0.190 second(s) .44Kbyte(s)/sec.
[AR1-ftp]
[AR1-ftp]put flash:/dhcp/dhcp-duid.txt //上传文件至AR2根目录
Port command okay.
Opening ASCII mode data connection for dhcp-duid.txt.
%
Transfer complete.
FTP: byte(s) sent in 0.180 second(s) .44byte(s)/sec.
[AR1-ftp]q
Server closing. <AR2>dir
Directory of flash:/ Idx Attr Size(Byte) Date Time(LMT) FileName
-rw- May :: dhcp-duid.txt //验证确实从AR1上传了该文件
drw- - May :: dhcp
-rw- , May :: portalpage.zip
-rw- , May :: statemach.efs
-rw- , May :: sslvpn.zip ,, KB total (, KB free)
<AR2>
----------------------------分割线---------------------------
[AR1]int g0//
[AR1-GigabitEthernet0//]ip add 10.1.1.1 //配置设备AR1的IP
May ::-: AR1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[AR1-GigabitEthernet0//] [AR2]int g0//
[AR2-GigabitEthernet0//]ip add 10.1.1.2 //配置设备AR2的IP
May ::-: AR2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state. [AR2-GigabitEthernet0//]ping 10.1.1.1 //ping命令测试链路连通性
PING 10.1.1.1: data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 10.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 10.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 10.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 10.1.1.1: bytes= Sequence= ttl= time= ms
--- 10.1.1.1 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // ms [AR2-GigabitEthernet0//]q
[AR2]rsa local-key-pair create //生成本地RSA主机秘钥对
The key name will be: Host
% RSA keys defined for Host already exist.
Confirm to replace them? (y/n)[n]:y
The range of public key size is ( ~ ).
NOTES: If the key modulus is greater than ,
It will take a few minutes.
Input the bits in the modulus[default = ]:
Generating keys...
.......++++++++++++
...++++++++++++
................++++++++
..++++++++ [AR2]dis rsa local-key-pair public //查看本地秘钥对中的公钥信息
=====================================================
Time of Key pair created: -- ::-: //公钥生成的时间
Key name: Host //公钥的名称
Key type: RSA encryption Key //公钥的类型
=====================================================
Key code: D9ECDB6E 9EECEFAA 41985FA2 B3E9B851 FEBF8F95
A0E9AC13 3E76F9DB CCD8C7F6 430C6860 CBA492EC
5DC2BEE5 3BBDAFE4 B5AADFD9 E67F0750 C9AAA4F9
1BDA1F4D =====================================================
Time of Key pair created: -- ::-:
Key name: Server
Key type: RSA encryption Key
=====================================================
Key code: D2F5696B 7E37CF47 A0BC83A3 E493B894 07AD556D
AD009F7A 6B84CAD6 A04D41DA E7E6E681 1F033564
DCB9D67B C49B168C 894A88A3 CE999F66 02110D8F
85F1680C D9CD8B18 DF740263 26BFEC8C FBD9D98A
A26BFBD2 CE71A57F 345BC3A8 7D8E4737 [AR2]
[AR2]user-interface vty //配置VTY虚拟用户界面
[AR2-ui-vty0-]authentication-mode aaa //配置用户AAA授权验证模式
[AR2-ui-vty0-]protocol inbound ? //指定VTY界面只支持?什么协议
all All protocols
ssh SSH protocol
telnet Telnet protocol
[AR2-ui-vty0-]protocol inbound ssh //指定VTY用户界面只支持SSH协议
[AR2-ui-vty0-]aaa
[AR2-aaa]local-user tangjun password cipher //配置本地用户tangjun和密文口令123
Info: Add a new user.
[AR2-aaa]local-user tangjun service-type ssh //配置本地用户tangjun的接入类型为SSH
[AR2-aaa]local-user tangjun privilege level //配置本地用户tangjun的优先级为15最高级
[AR2-aaa]q //此处务必要回退至[AR2],方可使用ssh命令
[AR2]ssh user tangjun authentication-type password //指定用户tangjun为SSH用户,并延续密码认证方式
Authentication type setted, and will be in effect next time
[AR2]stelnet server enable //开启设备的STelnet功能(即开启SSH服务器)
Info: Succeeded in starting the STELNET server. [AR2]dis ssh user-information tangjun //在SSH服务器查看SSH用户配置信息
-------------------------------------------------------------------------------
Username Auth-type User-public-key-name
-------------------------------------------------------------------------------
tangjun password null //可以观察所配置的用户名及认证方式
------------------------------------------------------------------------------- [AR2]dis ssh server status //查看SSH服务器全局配置信息
SSH version :1.99
SSH connection timeout : seconds
SSH server key generating interval : hours
SSH Authentication retries : times
SFTP Server :Disable
Stelnet server :Enable //启用状态 [AR1]ssh client first-time enable //开启SSH用户端AR1首次认证功能
[AR1]stelnet 10.1.1.2 //连接对端的SSH服务器
Please input the username:tangjun //输入用户名
Trying 10.1.1.2 ...
Press CTRL+K to abort
Connected to 10.1.1.2 ...
The server is not authenticated. Continue to access it? (y/n)[n]:y //因首次认证,将不对RSA公钥进行有效性检查
May ::-: AR1 %%01SSH//CONTINUE_KEYEXCHANGE(l)[]:The server h
ad not been authenticated in the process of exchanging keys. When deciding wheth
er to continue, the user chose Y.
[AR1]
Save the server's public key? (y/n)[n]:y //登录后系统会自动分配RSA公钥,留待下次登录认证
The server's public key will be saved with the name 10.1.1.2. Please wait...
May ::-: AR1 %%01SSH//SAVE_PUBLICKEY(l)[]:When deciding whet
her to save the server's public key 10.1.1.2, the user chose Y.
[AR1]
Enter password:
<AR2> //成功远程登录AR2
<AR2>dis ssh server session //查看当前SSH服务器端的会话连接信息
--------------------------------------------------------------------
Conn Ver Encry State Auth-type Username
--------------------------------------------------------------------
VTY 2.0 AES run password tangjun //可发现:已通过VTY线路0远程登录上了
--------------------------------------------------------------------
<AR2>
[AR2]aaa
[AR2-aaa]local-user tangjun2 password cipher //配置本地用户tangjun2和密文口令123
Info: Add a new user.
[AR2-aaa]local-user tangjun2 service-type ssh //配置本地用户tangjun2的接入类型为SSH
[AR2-aaa]local-user tangjun2 privilege level //配置本地用户tangjun2的优先级为3管理级
[AR2-aaa]local-user tangjun2 ftp-directory flash:
[AR2-aaa]q
[AR2]ssh user tangjun2 authentication-type password //指定用户tangjun2为SSH用户,并延续密码认证方式
Authentication type setted, and will be in effect next time
[AR2]sftp server enable //开启设备的SFTP功能
Info: Succeeded in starting the SFTP server. [AR2]dis ssh server status
SSH version :1.99
SSH connection timeout : seconds
SSH server key generating interval : hours
SSH Authentication retries : times
SFTP Server :Enable
Stelnet server :Enable <AR1>sy
Enter system view, return user view with Ctrl+Z.
[AR1]sftp 10.1.1.2 //连接对端AR2的SSH服务器(注意在系统视图下敲命令)
Please input the username:tangjun2
Trying 10.1.1.2 ...
Press CTRL+K to abort
Enter password:
sftp-client> //已成功登录AR2 [AR2]dis ssh server session //查看SSH服务器全局配置信息
--------------------------------------------------------------------
Conn Ver Encry State Auth-type Username
--------------------------------------------------------------------
VTY 2.0 AES run password tangjun2 //可发现:已通过VTY线路0远程登录上了
--------------------------------------------------------------------
Huawei-R&S-网络工程师实验笔记20190530-FTP上传下载、STelnet登录、SFTP登录的更多相关文章
- C#的FTP上传下载的实验
前段时间做了一个FTP操作服务器文件的实验,现在把一些经验写下来,免得忘记. 1.上传的处理:目标文件夹A上传到服务器指定目录.先检索服务器目录中有无同名文件夹,若有,则先改名,上传成功后再删除,上传 ...
- linux学习笔记-linux主机上传下载文件至linux虚拟机的方法
我的邮箱地址:zytrenren@163.com欢迎大家交流学习纠错! 1.上传文件 scp -r file 用户名@ip地址:目标目录 2.下载文件 scp -r 用户名@ip地址:文件 目标目录
- 超全面的JavaWeb笔记day22<文件上传>
文件上传概述 1 文件上传的作用 例如网络硬盘!就是用来上传下载文件的. 在智联招聘上填写一个完整的简历还需要上传照片呢. 2 文件上传对页面的要求 上传文件的要求比较多,需要记一下: 1. 必须使用 ...
- Huawei-R&S-网络工程师实验笔记20190525-设备登录、VRP基本配置、文件系统
>Huawei-R&S-网络工程师实验笔记20190525-设备登录.VRP基本配置.文件系统(环回接口.telnet远程.AAA登录.命令行.时钟.banner.文件目录) >& ...
- Huawei-R&S-网络工程师实验笔记20190524-VRP的系统、接口视图下基本操作
>Huawei-R&S-网络工程师实验笔记20190524-VRP的系统.接口视图下基本操作(重命名.配置IP.VLAN接口.双工模式.console口) >>实验开始,先上 ...
- Huawei-R&S-网络工程师实验笔记20190527-华为设备密码重置、设置web管理
>Huawei-R&S-网络工程师实验笔记20190527-华为设备密码重置.设置web管理 >>实验开始(使用SecureCRT 等工具软件): 一.华为设备密码重置,通过 ...
- Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置、桥优先级、根桥选举、根端口、路径开销、边缘端口)
>Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置.桥优先级.根桥选举.根端口.路径开销.边缘端口) >>实验开始,先上拓扑图参考: &l ...
- Huawei-R&S-网络工程师实验笔记20190615-IP基础(AR201上配置IP)
>Huawei-R&S-网络工程师实验笔记20190615-IP基础(AR201上配置IP) >>实验开始,先上拓扑图参考: >>>一般正常配置IP操作如下 ...
- Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Hybrid端口)
>Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Hybrid端口) >>实验开始,先上拓扑图参考: >>>实验目标:分别实现主 ...
随机推荐
- luogu1641 [SDOI2010]生成字符串
题目大意 把$n$个$1$和$m$个$0$组成字符串,在任意的前$k$个字符中,$1$的个数不能少于$0$的个数.求这样的字符串的个数.$1\leq m\leq n\leq 1000000$. 原始模 ...
- 【POJ 1716】 Integer Intervals
[题目链接] 点击打开链接 [算法] 差分约束系统 [代码] #include <algorithm> #include <bitset> #include <cctyp ...
- PCB 第一个node.js应用
一.Node安装地址: https://nodejs.org/zh-cn/ 二.Node第一个应用实例 启动webnode.js应用: node webnode.js webnode.js代码: va ...
- E20170630-ts
displacement n. 取代,替代; 免职,停职; [船] 排水量; [化] 置换;
- Knights of the Round Table(Tarjan+奇圈)
http://poj.org/problem?id=2942 题意:n个武士,某些武士之间相互仇视,如果在一起容易发生争斗事件.所以他们只有满足一定的条件才能参加圆桌会议:(1)相互仇视的两个武士不能 ...
- python抢票开发——设备预约助手实现
女朋友是药学院的,做实验时需要在特定的网站上进行设备预约,由于预约人数过多,从而导致从浏览器登录不进去或者登录进去预约失败等情况,所以我用python帮她写了一个抢位助手,让程序自动去进行位置预定,实 ...
- [转]sed常用命令总结
转自:http://blog.chinaunix.net/uid-26963748-id-3249732.html 一.Sed简介 Sed:Stream Editor 流式编辑器 又称行编辑器,每次 ...
- Algebrizer
Microsoft SQL Server 2012 Internals 把 SQL 语句的处理分为四个阶段,分别是 解析.绑定.优化.执行,如图所示: 解析(Parse)主要是语法分析,比较简 ...
- 【Java基础】多态
首先先来个总结: 什么是多态 面向对象的三大特性:封装.继承.多态.从一定角度来看,封装和继承几乎都是为多态而准备的.这是我们最后一个概念,也是最重要的知识点. 多态的定义:指允许不同类的对象对同一消 ...
- tp5.0分页样式调控
基础的分页调用 /** * 控制器部分代码 */ //实例化模型 $areasModel=new Areas(); //分页数据集 $listarea=$areasModel->paginate ...