首页 > Web开发 > 详细

telnet 测试ftp运行原理

时间:2019-07-15 11:24:01      阅读:110      评论:0      收藏:0      [点我收藏+]

我们需要两台虚拟机,一台作为ftp服务器,一台作为客户端;

在服务器端建立测试文件

[root@mycat ftp]# touch {1..5}.txt

在客户端进行测试,我们用telnet进行测试

[root@slave1 ~]# telnet 192.168.88.128 21
Trying 192.168.88.128...
Connected to 192.168.88.128.
Escape character is ^].
220 (vsFTPd 3.0.2)
user ftp
331 Please specify the password.
pass ftp
230 Login successful.
PORT 192,168,88,102,48,57
200 PORT command successful. Consider using PASV.

客户端再开一个窗口用nc工具进行监听12345端口

[root@slave1 ~]# nc -l 192.168.88.102 12345

在客户端测试

list
150 Here comes the directory listing.
226 Directory send OK.



[root@slave1 ~]# nc -l 192.168.88.102 12345
-rw-r--r--    1 0        0               0 Jul 15 02:10 1.txt
-rw-r--r--    1 0        0               0 Jul 15 02:10 2.txt
-rw-r--r--    1 0        0               0 Jul 15 02:10 3.txt
-rw-r--r--    1 0        0               0 Jul 15 02:10 4.txt
-rw-r--r--    1 0        0               0 Jul 15 02:10 5.txt
drwxr-xr-x    2 0        0               6 Oct 30  2018 pub

这就是ftp主动连接

telnet 测试ftp运行原理

原文:https://www.cnblogs.com/loganSxb/p/11187506.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!