Hi Irfan,

In the first line...

'RSAuAuthentication yes'

That looks like a typo to me.

On 2/17/2011 3:42 AM, Irfan Sayed wrote:
Hi All,

I am still facing the issue. can someone please suggest ??

~irfan

--- On Thu, 2/10/11, Irfan Sayed<irfan_sayed2...@yahoo.com>  wrote:

From: Irfan Sayed<irfan_sayed2...@yahoo.com>
Subject: permission denied for Net::SSH::Perl module
To: beginners@perl.org
Date: Thursday, February 10, 2011, 11:09 AM

Hi All,

i am using Perl :net:ssh module to connect remotely to server and execute the 
remote command
following is the code :

my %opt = ( 'options' =>  [ 'ForwardAgent yes','RSAuAuthentication 
yes','ConnectTimeout 120','ServerAliveInterval 60','ServerAliveCountMax 20','debug 
1','identity_files /home/irfanjs/.ssh/id_rsa','UserKnownHostsFile 
/home/irfanjs/.ssh/known_hosts' ] );
$opt{'identity_files'} = [ $identity ];
my $ssh = Net::SSH::Perl->new($host, %opt);
print "creating an ssh object\n";
print "loggin in \n";
$ssh->login($user);

my $cmd = "ls";
print "gonna run $user\@$host $cmd\n";
  ($stdout, $stderr, $exit) = $ssh->cmd("$cmd");
print "$stderr\n";
print "$stdout\n";

but when i run the script, it fails saying that , "permission denied " error
manually i am able to run the "ls"
  command using the identity file but when i run the same using Perl then it 
fails

can someone please suggest

regards
Irfan










--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to