RH8 with perl ftp across firewall
Hello,
i'm doing ftp with perl across a firewall. Before transfering files, i want to list them. But in RH8, my ftp connection is passive mode on and i do not know , in my perl script how to turn it off.
Manually i get this :
ftp xxx.xx.xx.xx
230 User toto logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> passive
Passive mode off.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls (yy.yy.yy.yy,abcd).
total 856
drwxr-xr-x 2 toto users 843776 Nov 29 13:38 dir_to_list
226 Transfer complete.
if i do not invoque passive i got this :
227 Entering Passive Mode (xxx,xx,xx,xx,aa,bb)
ftp: connect: Connection refused
Since passive on is the default in RedHat8, how can i turn it off in my script.
i've tried ftp->pasv() but it doesn't seem to work. I'm still not able to list the directory.
Is there a way to tell perl not sending the passive command so i will connect in passove mode off?
Merci
|