I am trying to use perl's Net::FTPSSL to connect to a host. When I run the script, it hangs and eventually times out on my error logs, but not to the browser. The problem seems to be when creating the new connection. If I use Filezilla to connect, there is a pause/response warning that the host key is unknown. When I 'ok' it in Filezilla, it passes a command "Trust new Hostkey: Once" and send the password and logs in. If this is my problem, how do I send that 'ok'? Here is my code - it hangs on the second line - before even getting to the username/password.
The code I'm using is:
use Net::FTPSSL;
$ftpobj = Net::FTPSSL -> new('host.com', Port => 21) or die "Can't open server.";
$ftpobj -> login("user","pass");
$ftpobj -> get ("file.csv");
$ftpobj -> quit;