Help for this page

Select Code to Download


  1. or download this
    $sftp = Net::SFTP::Foreign->new($host);
    $sftp->error and die "unable to connect to remote host: " . $sftp->err
    +or;
    
  2. or download this
    my %args = ( host     => "localhost",
             user     => "user",
    ...
    
    my $sftp = Net::SFTP::Foreign->new(%args);
    $sftp->die_on_error("Unable to establish SFTP connection");