in reply to Re^2: Net SSH2 auth_publickey not working in Windows
in thread Net SSH2 auth_publickey not working in Windows

Hi, I don't use windows, but compare your auth_publickey to mine below.
$ssh->auth_publickey($SSH_USER, './virt_pub', './virt_priv.ppk') or di +e "pk connection error $!\n";
# you need permission to read the keys $ssh2->auth_publickey('zentara', '/home/zentara/.ssh/id_dsa.pub', '/home/zentara/.ssh/id_dsa', $pass );
It's possible that your dot slash notation for specifying the key's path, may need a full path from root. You may not be running from the directory you think you are in.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^4: Net SSH2 auth_publickey not working in Windows
by Badhedgehog (Initiate) on May 13, 2011 at 09:13 UTC
    Firstly, thanks for taking the time to reply.

    I've tried a number of variations on a theme for the path including:
    • C:\putty\virt_pub
    • C:/putty/virt_pub
    as well as the relative path in my previous post. All are giving the same 'Resource temporarily unavailable' error.

    A Wireshark capture of the conversation doesn't reveal anything suspicious looking aside from the conversation between the two boxes being a bit short ;).

    Nick
      The default format used by PuTTY for the keys it generates is probably not supported by libssh2/Net::SSH2.

      Though, you should be able to use puttygen to convert them to OpenSSH format.

        Again, thanks for the reply.

        I've checked that one and have uploaded the openSSH format key to the server. Following this I could use puTTY for key-based logon, so I'm assuming that I've done that side of things correctly.

        Nick