On Sep 30, 5:19 am, irfan_sayed2...@yahoo.com (Irfan Sayed) wrote: > Hi, > > I am using net::ssh module of Perl to connect to remote machine and execute > some > remote commands > i can connect using user-name and password hard coded in the script like > below: > > #!/usr/local/bin/perl > > use strict; > use Net::SSH::Perl; > my $host="dna-ci2.data.corp.sp1.xxx.com"; > my $cmd="ls"; > my $user="abc"; > my $pass="123"; > my $ssh = Net::SSH::Perl->new($host); > $ssh->login($user,$pass); > my($stdout, $stderr, $exit) = $ssh->cmd($cmd); > #print "$stdout\n"; > #print "$stderr\n"; > print "$exit\n"; > > but now i need to use the "identity file" instead of simply putting plan text > password in the script due to security issue > can someone please point me how to achieve this >
Doesn't the 'identity_files' parameter handle this... [ See the named parameters options of the %params hash which gets passed to new() ] -- Charles DeRykus -- Charles -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/