#!/usr/bin/perl use strict; use warnings; use Net::FTPSSL; open (STDERR, "> logfile.txt"); # Redirects STDERR to this file. my %connectionHash = ( Port => 21, Encryption => 'E', Debug => 1, OverridePASV => 'xxx.xxx.xxx.xxx', Croak => 0, PreserveTimestamp => 0, ); my %sslHash = ( #SSL_cert_file => '', #SSL_reuse_ctx => '', SSL_key_file => 'MD5:9f:...f9', #SSL_ca_file => '', #SSL_use_cert => 1, ); $connectionHash{SSL_Client_Certificate} = \%sslHash; my $ftps = Net::FTPSSL->new( 'xxx.xxx.xxx.xxx:', %connectionHash, ); $ftps->login ('user', 'pass') or warn "Could not login to xxx.xxx.xxx.xxx: ", $ftps->message; $ftps->nlst(); $ftps->quit();