Help for this page

Select Code to Download


  1. or download this
    use Net::SCP qw(scp);
    my ($host, $username) = ("example.com", "eric");
    ...
    for my $file (@files) {
      $scp->put($file) or warn $scp->{errstr};
    }
    
  2. or download this
    use Net::SSH2;
    my $ssh2 = Net::SSH2->new();
    ...
    if ($ssh2->auth_keyboard('password')) {
      for my $file (@files) { scp_put($file); }
    }