in reply to Re: Unable to do SCP on multiple machines using Perl's Net::SCP::Expect module
in thread Unable to do SCP on multiple machines using Perl's Net::SCP::Expect module

Thanks for the suggestion but i have to use identity file and i could not find any option for specifying the same (while creating connection) in either of the modules.
  • Comment on Re^2: Unable to do SCP on multiple machines using Perl's Net::SCP::Expect module

Replies are listed 'Best First'.
Re^3: Unable to do SCP on multiple machines using Perl's Net::SCP::Expect module
by salva (Canon) on May 03, 2014 at 19:51 UTC
    key_path
      Thanks! I tried using Net::OpenSSH with key_path option.
      my $key_path = "/home/tom/.ssh/id_file"; my $ssh = Net::OpenSSH->new( $host, key_path => $key_path, ); $ssh->scp_put("$war_full_path", "$ENV{HOME}") or die "SCP failed: " . +$ssh->error;
      Now it fails with the message:
      Permission denied (publickey).
      SCP failed: unable to establish master SSH connection: master process exited unexpectedly at /home/tom/deploy.pl line 64

      Line 64 is the above line where i am using scp_put
        Are you able to log from the command line?
        ssh -vv -i "/home/tom/.ssh/id_file" hostname