引用:[scfeng@test scfeng]$ ftp 11.22.33.1 2121
Connected to 11.22.33.1 (11.22.33.1).
220 "======= Welcome to Vulpecula FTP service ======= "
Name (11.22.33.1:scfeng): scfeng
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (11,22,33,1,142,237)
ftp: connect: Connection refused
ftp>
如果联机时无法建立数据传输端口,可能是防火墙设置的问题,我们可以试试passive命令,来将passive mode设为off,如下所示:
引用:ftp> passive
Passive mode off.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxr-xr-x 2 500 500 4096 Apr 20 08:05 20030420
-rw-r--r-- 1 500 500 338828 Apr 20 18:31 abc.exe
drwx------ 2 500 500 4096 Apr 20 08:04 mail
226 Directory send OK.
ftp>
这样就能正确联机了。