Help for this page

Select Code to Download


  1. or download this
    d:\Desktop>sshtest
    libssh2_knownhost_init(ss->session) -> 0x294be38
    ...
    Authentication failed (username/password) (-18 LIBSSH2_ERROR_PUBLICKEY
    +_UNRECOGNI
    ZED) at D:\Desktop\sshtest.pl line 13.
    Net::SSH2::DESTROY object 0x247cf08
    
  2. or download this
    my $ssh2 = Net::SSH2->new(debug => 1);
    $ssh2->connect("shell02.theworld.com") or $ssh2->die_with_error ;
    $ssh2->check_hostkey('ask', "d:/profiles/known_hosts.pub") 
        or $ssh2->die_with_error ;
    $ssh2->auth_password($login{user}, $login{password}) 
        or $ssh2->die_with_error;