Helpful Information
 
 
Category: FTP Help
Net::ftp security

Hi all

When creating an Net::ftp object,

my $username = 'xxxxx';
my $password = 'yyyyy';

my $ftp = Net::FTP->new('my.ftpserver.com', Debug => 0);
my $ftp->login($username,$password);

what security measures can be taken to hide (or to make it really inconvenient to access) the username and password? Thanks.

You mean as far as someone getting to the source of the script? I don't think there is anything you can really do when it comes to how it's transmitted to the ftp site from Net::FTP..

It only adds very little but I read my username and password from a txt file on the file system.. So you end up with something like:



my $ftppassfile = 'path/ftpuser.pass';
my ($ftp_username,$ftp_password);
open (FTPPASSFILE, "$ftppassfile") or die "Couldn't open $ftppassfile: $!\n";
while (<FTPPASSFILE>) {
($ftp_username,$ftp_password) = split;
}

my $ftp_conn = Net::FTP->new('my.ftpserver.com', Debug => 0);
my $ftp_conn->login($ftp_username,$ftp_password);



-Chris

You got what I'm asking.

I didn't think there were any good options in hiding the information, besides keeping users off of the system.

Just want to find out what others do concerning this sort of security. Thanks.










privacy (GDPR)