Help for this page

Select Code to Download


  1. or download this
        $ssh2= Net::SSH2->new();
    
    ...
        print "$ppk_filepath exists!\n" if -e $ppk_filepath;
    
        $ssh2->auth_publickey($user, undef, $ppk_filepath, 'passphrase123'
    + ) or $ssh2->die_with_error;
    
  2. or download this
        use Net::SSH::Any;
        $Net::SSH::Any::debug = -1;
    ...
        if ($ssh2->error) {
            die "Connection error: " . $ssh2->error;
        }