in reply to Weird Net::FTPSSL error

This is almost always caused by NAT issues with the control channel (which Passive Mode gets around, which is default in Net::FTPSSL), or the FTP server itself is replying back with an incorrect passive mode IP address.

In your new() constructor, try setting OverridePASV => x.x.x.x, where x.x.x.x is the same as the IP you connect initially to.

If that doesn't work, fire up tcpdump or Wireshark and have a look at what traffic you see when you attempt to connect. Post the results of that back here if you don't understand them.

Replies are listed 'Best First'.
Re^2: Weird Net::FTPSSL error
by ultranerds (Hermit) on Apr 10, 2016 at 06:08 UTC
    Thanks for the reply. Tried that, but to no avail :( I just get:

    connect: Connection refused at /usr/lib/x86_64-linux-gnu/perl5/5.20/Net/SSLeay/Handle.pm line 229.


    I did a bit more research, and found out I can do it via Curl:

    curl -T /home/user/public_html/cgi-bin/hotels/admin/com_spots.csv ftp://dest-server.org/public_html/cgi-bin/links/admin/IMPORT/ --user user:pass

    Tested that out, and works a treat :)

    Thanks for trying to help though!

    Cheers

    Andy

      So you aren't using FTP over SSL/TLS after all (there are no SSL/TLS options in your curl usage). If you still want to use Perl then switch to Net::FTP.