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
Regards,
Irfan