我的應用程式背景與參考文獻的差不多。
就是在虛擬機器裡面串連主機,實現檔案的上傳與下載。
在debian裡輸入命令
$ ftp 192.168.1.248
Connected to 192.168.1.248.
220-FileZilla Server version 0.9.34 beta
220-written by Tim Kosse (Tim.Kosse@gmx.de)
220 Please visit http://sourceforge.net/projects/filezilla/
Name (192.168.1.248:cherish): xxxx
331 Password required for xxxx
Password:
230 Logged on
Remote system type is UNIX.
ftp> dir
200 Port command successful
150 Opening data channel for directory list.
425 Can't open data connection
自己嘗試在Windows裡面串連,發現沒有問題,於是不會是FileZilla的問題。
搜尋 虛擬機器 425 Can't open data connection 找到參考文獻,文章說用
用man ftp查看協助:
-p Use passive mode for data transfers. Allows use of ftp in environments
where a firewall prevents connections from the outside world
back to the client machine. Requires that the ftp server support
the PASV command. This is the default if invoked as pftp.
於是用命令 ftp -p 192.168.1.248成功登入
參考文獻
http://blog.csdn.net/imshang/archive/2010/04/23/5522158.aspx