辋川集

木末芙蓉花,山中发红萼,涧户寂无人,纷纷开且落

By - 陳 思敬

Telnet FTP

Call form a Client:

~  telnet 192.168.98.129 21
Trying 192.168.98.129...
Connected to localhost.
Escape character is '^]'.
220-FileZilla Server version 0.9.45 beta
220-written by Tim Kosse (tim.kosse@filezilla-project.org)
220 Please visit http://sourceforge.net/projects/filezilla/
list
530 Please log in with USER and PASS first.
bye
500 Syntax error, command unrecognized.
quit
221 Goodbye
Connection closed by foreign host.


Answer from the Server:

(000004)2015/4/1 8:49:48 - (not logged in) (192.168.93.191)> Connected, sending welcome message...
(000004)2015/4/1 8:49:48 - (not logged in) (192.168.93.191)> 220-FileZilla Server version 0.9.45 beta
(000004)2015/4/1 8:49:48 - (not logged in) (192.168.93.191)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000004)2015/4/1 8:49:48 - (not logged in) (192.168.93.191)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000004)2015/4/1 8:49:51 - (not logged in) (192.168.93.191)> list
(000004)2015/4/1 8:49:51 - (not logged in) (192.168.93.191)> 530 Please log in with USER and PASS first.
(000004)2015/4/1 8:49:52 - (not logged in) (192.168.93.191)> bye
(000004)2015/4/1 8:49:52 - (not logged in) (192.168.93.191)> 500 Syntax error, command unrecognized.
(000004)2015/4/1 8:49:55 - (not logged in) (192.168.93.191)> quit
(000004)2015/4/1 8:49:55 - (not logged in) (192.168.93.191)> 221 Goodbye
(000004)2015/4/1 8:49:55 - (not logged in) (192.168.93.191)> disconnected.

登录FTP:

~  ftp 192.168.98.129 21
Connected to 192.168.98.129.
220-FileZilla Server version 0.9.45 beta
220-written by Tim Kosse (tim.kosse@filezilla-project.org)
220 Please visit http://sourceforge.net/projects/filezilla/
Name (192.168.98.129:Christen): root
331 Password required for root
Password:
230 Logged on
Remote system type is UNIX.

下载文件:

ftp> dir
229 Entering Extended Passive Mode (|||64827|)
150 Opening data channel for directory listing of "/"
-rw-r--r-- 1 ftp ftp        1898345 Jul 25  2014 Bliss.jpg
-rw-r--r-- 1 ftp ftp         188466 Jul 25  2014 Bull.png
-rwxr-xr-x 1 ftp ftp     1223823024 Jul 25  2014 FlashPro_12_LS3.exe
-rw-r--r-- 1 ftp ftp              2 Apr 01 09:05 readme.txt
drwxr-xr-x 1 ftp ftp              0 Jul 25  2014 Windows
drwxr-xr-x 1 ftp ftp              0 Sep 25  2014 田英章硬笔作品录
226 Successfully transferred "/"
ftp> get readme.txt
local: readme.txt remote: readme.txt
229 Entering Extended Passive Mode (|||64833|)
150 Opening data channel for file download from server of "/readme.txt"
100% |***********************************|     2        3.62 KiB/s    00:00 ETA
226 Successfully transferred "/readme.txt"
2 bytes received in 00:00 (1.89 KiB/s)

下载图片:

ftp> get Bull.png
local: Bull.png remote: Bull.png
229 Entering Extended Passive Mode (|||64847|)
150 Opening data channel for file download from server of "/Bull.png"
100% |***********************************|   184 KiB    4.68 MiB/s    00:00 ETA
226 Successfully transferred "/Bull.png"
WARNING! 610 bare linefeeds received in ASCII mode.
File may not have transferred correctly.
188466 bytes received in 00:00 (4.64 MiB/s)

打开图片出错…… 🙁


Java 登录 FTP
服务器响应:

(000013)2015/4/1 9:54:55 - (not logged in) (192.168.93.191)> Connected, sending welcome message...
(000013)2015/4/1 9:54:55 - (not logged in) (192.168.93.191)> 220-FileZilla Server version 0.9.45 beta
(000013)2015/4/1 9:54:55 - (not logged in) (192.168.93.191)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000013)2015/4/1 9:54:55 - (not logged in) (192.168.93.191)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000013)2015/4/1 9:54:56 - (not logged in) (192.168.93.191)> user root
(000013)2015/4/1 9:54:56 - (not logged in) (192.168.93.191)> 331 Password required for root
(000013)2015/4/1 9:54:56 - (not logged in) (192.168.93.191)> pass ******
(000013)2015/4/1 9:54:56 - root (192.168.93.191)> 230 Logged on
(000013)2015/4/1 9:54:56 - root (192.168.93.191)> syst
(000013)2015/4/1 9:54:56 - root (192.168.93.191)> 215 UNIX emulated by FileZilla
(000013)2015/4/1 9:54:56 - root (192.168.93.191)> pwd
(000013)2015/4/1 9:54:56 - root (192.168.93.191)> 257 "/" is current directory.
(000013)2015/4/1 9:54:57 - root (192.168.93.191)> port 127,0,0,1,197,134
(000013)2015/4/1 9:54:57 - root (192.168.93.191)> 200 Port command successful
(000013)2015/4/1 9:54:57 - root (192.168.93.191)> type i
(000013)2015/4/1 9:54:57 - root (192.168.93.191)> 200 Type set to I
(000013)2015/4/1 9:54:57 - root (192.168.93.191)> nlst
(000013)2015/4/1 9:54:57 - root (192.168.93.191)> 150 Opening data channel for directory listing of "/"
(000013)2015/4/1 9:54:57 - root (192.168.93.191)> 425 Can't open data connection for transfer of "/"
(000012)2015/4/1 9:56:01 - root (192.168.93.191)> 421 No-transfer-time exceeded. Closing control connection.
(000012)2015/4/1 9:56:01 - root (192.168.93.191)> disconnected.
(000013)2015/4/1 9:56:56 - root (192.168.93.191)> 421 No-transfer-time exceeded. Closing control connection.
(000013)2015/4/1 9:56:56 - root (192.168.93.191)> disconnected.

1 thought on “Telnet FTP

Christen April 1, 2015 at 12:58 pm

A FTP of Java version:

hiclick.github.com/lab/java/networking/ftp/FTPConnection.java

Reply

Leave a Reply

Your email address will not be published.
*
*